15.11.2012, 21:44
Ok so I have a flying test that is set to when the test starts:
The problem is is that after they get to the checkpoint (the one above) it never changes and doesn't go to the next checkpoint. It dissapears for a second then reappears.
Here is the code of the test:
What is wrong and what should I change?
Thanks: jakejohnsonusa
Код:
CP[playerid] = 400; SetPlayerRaceCheckpoint(playerid,3,-1628.0454,-134.6547,15.0706,-1444.2026,53.7472,22.4049,7.0);
Here is the code of the test:
Код:
} if(CP[playerid]==400) //Fly Test { if(IsPlayerInAnyVehicle(playerid)) { DisablePlayerCheckpoint(playerid); CP[playerid] = 401; SetPlayerRaceCheckpoint(playerid,3,-1444.2026,53.7472,22.4049,-1133.9303,333.3353,59.9484,7.0); return 1; } else { SendClientMessage(playerid, COLOR_LIGHTBLUE,"You are not in the Plane!"); SendClientMessage(playerid, COLOR_LIGHTBLUE,"Visit the license center to retake the test."); DisablePlayerCheckpoint(playerid); RemovePlayerFromVehicle(playerid); SetPlayerVirtualWorld(playerid, 0); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); FlyingInfo[playerid][FlyingTest] = 0; } } else if(CP[playerid]==401) { if(UsingBelt[playerid] == 1) { DisablePlayerCheckpoint(playerid); CP[playerid] = 402; SetPlayerRaceCheckpoint(playerid,3,-1133.9303,333.3353,61.9484,-784.5469,437.4159,70.0663,7.0); return 1; } else { SendClientMessage(playerid, COLOR_LIGHTBLUE,"You haven't put on your seatbelt!"); SendClientMessage(playerid, COLOR_LIGHTBLUE,"Visit the license center to retake the test."); DisablePlayerCheckpoint(playerid); RemovePlayerFromVehicle(playerid); SetPlayerVirtualWorld(playerid, 0); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); FlyingInfo[playerid][FlyingTest] = 0; } } else if(CP[playerid]==402) { DisablePlayerCheckpoint(playerid); CP[playerid] = 403; SetPlayerRaceCheckpoint(playerid,3,-784.5469,437.4159,70.0663,-441.9236,571.4546,86.6628,7.0); return 1; } else if(CP[playerid]==403) { DisablePlayerCheckpoint(playerid); CP[playerid] = 404; SetPlayerRaceCheckpoint(playerid,3,-441.9236,571.4546,86.6628,-94.3545,814.2031,83.5022,7.0); return 1; } else if(CP[playerid]==404) { DisablePlayerCheckpoint(playerid); CP[playerid] = 405; SetPlayerRaceCheckpoint(playerid,3,-94.3545,814.2031,83.5022,206.8825,1103.8097,79.5797,7.0); return 1; } else if(CP[playerid]==405) { DisablePlayerCheckpoint(playerid); CP[playerid] = 406; SetPlayerRaceCheckpoint(playerid,3,206.8825,1103.8097,79.5797,360.8752,1433.6638,84.1947,7.0); return 1; } else if(CP[playerid]==406) { DisablePlayerCheckpoint(playerid); CP[playerid] = 407; SetPlayerRaceCheckpoint(playerid,3,237.0898,1716.8671,99.5659,-248.8507,1823.7936,109.7424,7.0); return 1; } else if(CP[playerid]==407) { DisablePlayerCheckpoint(playerid); CP[playerid] = 408; SetPlayerRaceCheckpoint(playerid,3,-248.8507,1823.7936,109.7424,-575.5409,1712.1396,132.7493,7.0); return 1; } else if(CP[playerid]==408) { DisablePlayerCheckpoint(playerid); CP[playerid] = 409; SetPlayerRaceCheckpoint(playerid,3,-575.5409,1712.1396,132.7493,-864.1115,1465.8033,93.3561,7.0); return 1; } else if(CP[playerid]==409) { DisablePlayerCheckpoint(playerid); CP[playerid] = 410; SetPlayerRaceCheckpoint(playerid,3,-864.1115,1465.8033,93.3561,-947.1935,1092.1521,79.0029,7.0); return 1; } else if(CP[playerid]==410) { DisablePlayerCheckpoint(playerid); CP[playerid] = 411; SetPlayerRaceCheckpoint(playerid,3,-947.1935,1092.1521,79.0029,-1172.3732,333.8894,47.6421,7.0); return 1; } else if(CP[playerid]==411) { DisablePlayerCheckpoint(playerid); CP[playerid] = 412; SetPlayerRaceCheckpoint(playerid,4,-1172.3732,333.8894,47.6421,-1533.0518,-36.5082,15.1076,7.0); return 1; } else if(CP[playerid]==412) { if(IsPlayerInAnyVehicle(playerid)) { new Float:health; new veh; veh = GetPlayerVehicleID(playerid); GetVehicleHealth(veh, health); if (health < 380) { format(string,sizeof(string)," You have failed the test due to reckless flying! Visit the license center to retake the test."); SendClientMessage(playerid,COLOR_LIGHTBLUE,string); DisablePlayerRaceCheckpoint(playerid); RemovePlayerFromVehicle(playerid); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); SetPlayerVirtualWorld(playerid, 0); FlyingInfo[playerid][FlyingTest] = 0; return 1; } else if(health >= 380.0) { DisablePlayerRaceCheckpoint(playerid); GameTextForPlayer(playerid," ~w~Test Completed.",3000,3); format(string,sizeof(string),"You have passed the Test. Here is your Flying license."); SendClientMessage(playerid,COLOR_LIGHTBLUE,string); PlayerInfo[playerid][pFlyLic] = 1; RemovePlayerFromVehicle(playerid); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); SetPlayerVirtualWorld(playerid, 0); FlyingInfo[playerid][FlyingTest] = 0; return 1; } } return 1; }
Thanks: jakejohnsonusa