24.06.2012, 11:29
What is do i need to add if he does leavemission so the truck will respawn and he will exit from the truck..
Код:
if(!strcmp(cmd, "/leavemission", true)) { if(IsPlayerConnected(playerid)) { if(PlayerIsTrucking[playerid] == 1) { DisablePlayerCheckpoint(playerid); PlayerIsTrucking[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, "You have stopped your mission"); if(IsATruck(idcar)) { RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not on any mission ! "); return 1; } } return 1; }