PDA

View Full Version : OnPlayerEnterDynamicCircle Not Working help rep +


Fitri
25/09/2013, 11:28 PM
stock loadgates()
{
new fail[256];
for(new i; i <MAX_GATES; i++)
{
format(fail,sizeof(fail),gatepath,i);
if(fexist(fail))
{
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5, -1, -1, -1);
INI_ParseFile(fail, "gate_data", .bExtra = true, .extra = i);
GateInfo[i][gates] = CreateDynamicObject(980,GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz],GateInfo[i][rxx],GateInfo[i][ryy],GateInfo[i][rzz]);
new text[300];
format(text,sizeof(text),"Autogate \nID = %d",GateInfo[i][id]);
GateInfo[i][label] = CreateDynamic3DTextLabel(text,0x8000FFFF,GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz],40);
}
}
return 1;
}



public OnPlayerEnterDynamicArea(playerid, areaid)
{
for(new i; i < MAX_GATES; i++)
{
if(areaid == GateInfo[i][area] )
{
MoveDynamicObject(GateInfo[i][gates],GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz]+5,2);
}
}
return 1;
}


public OnPlayerLeaveDynamicArea(playerid, areaid)
{
for(new i; i < MAX_GATES; i++)
{
if(areaid == GateInfo[i][area] )
{
MoveDynamicObject(GateInfo[i][gates],GateInfo[i][xx],GateInfo[i][yy],GateInfo[i][zz],2);
}
}
return 1;
}




help :D

Fitri
26/09/2013, 04:14 AM
help ?

CrossWindGaming
26/09/2013, 06:09 AM
Im not sure about CreateDyanmicCircle. I have only heard about SetPlayerCheckpoint or even CreateDynamicCheckpoint. Might wanna ****** some alternatives if this isnt in an include

iZN
26/09/2013, 06:14 AM
Why are you using -1 if it's done by default.
Change this to
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5, -1, -1, -1);
to this:
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5);

Fitri
08/10/2013, 02:45 PM
Why are you using -1 if it's done by default.
Change this to
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5, -1, -1, -1);
to this:
GateInfo[i][area] = CreateDynamicCircle(GateInfo[i][xx],GateInfo[i][yy],5);

-1 its all world, player, interior