14.07.2013, 18:59
Hi, I wanted to test the callback OnPlayerEnterDynamicCp, but when I enter in the checkpoint, nothing happen..
Here's my code :
Top of the script :
OnGameModeInit() :
Then the callback OnPlayerEnterDynamicCheckpoint(playerid, streamid) :
Here's my code :
Top of the script :
Код:
new ordi1; new ordi2; new ordi3; new ordi4;
Код:
ordi1 = CreateDynamicCP(337.4386,197.7973,1014.7152, -1, -1, -1, -1, 100);
Код:
public OnPlayerEnterDynamicCheckpoint(playerid, streamid) { if(IsPlayerInDynamicCP(playerid, ordi1) && gTeam[playerid] == NINJA) { DestroyDynamicCP(ordi1); ordi2 = CreateDynamicCP(356.4801,162.1948,1019.9844,10,-1,-1,-1,100.0); } else if(IsPlayerInDynamicCP(playerid, ordi2) && gTeam[playerid] == NINJA) { DestroyDynamicCP(ordi2); ordi2 = CreateDynamicCP(364.1272,152.5401,1025.7964,10,-1,-1,-1,100.0); } else if(IsPlayerInDynamicCP(playerid, ordi3) && gTeam[playerid] == NINJA) { DestroyDynamicCP(ordi3); ordi4 = CreateDynamicCP(353.6466,171.4531,1025.7964,10,-1,-1,-1,100.0); } else if(IsPlayerInDynamicCP(playerid, ordi4) && gTeam[playerid] == NINJA) { GameTextForAll("~r~WOW !",1000,5); } }