20.05.2014, 19:11
Try:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
new Float: sX, Float: sY, Float: sZ;
if(checkpointid == dmvcp1)
{
DestroyDynamicCP(dmvcp1);
dmvcp2 = CreateDynamicCP(1606.9996, -2319.3191, -2.8516, 5, 0, 0, playerid, 2000);
}
else if(checkpointid == dmvcp2)
{
DestroyDynamicCP(dmvcp2);
dmvcp3 = CreateDynamicCP(1575.9720, -2296.1660, -2.9355, 5, 0, 0, playerid, 2000);
}
else if(checkpointid == dmvcp3)
{
DestroyDynamicCP(dmvcp3);
GivePlayerCash(playerid, -2500);
GameTextForPlayer(playerid, "~g~ Passed!", 1500, 0);
GetPlayerPos(playerid, sX, sY, sZ);
SetPlayerPos(playerid, sX, sY, sZ+2);
DestroyVehicle(dmvcar[0]);
}
return 0;
}