01.08.2017, 23:09
HI, I have made an trucking job system, its acctually 99% working but got something bug,,, when i enter a truck to do trucking missions, it will be showing where i need to go (to Checkpoint)... and if player get out from the truck then will be warned like "you got 30 second to enter the car of failed mission". And the problem is when i re-enter the car, the time still count and when it 0 misson failed . idk what is the problem. can you guys help me to fix the script ? iam really glad to say thank you
Script :
Thanks and hopefully someone can help me
Note : Sorry for my bad english xD
Script :
Код:
forward pvTimeDown(playerid); public pvTimeDown(playerid) { new vid = GetPVarInt(playerid, "LastVehicle"); pvtime[playerid] --; if (pvtime[playerid]== 0) { KillTimer(pvtimer[playerid]); if(IsInTMis[playerid]==1 && IsInPMis[playerid]==0){ DestroyVehicle(vid); } else { SetVehicleToRespawn(vid); } pvtime[playerid] = 0; IsInTMis[playerid]=0; IsInPMis[playerid]=0; SetVehicleParamsForPlayer(vid, playerid, 0, 0); SendClientMessage(playerid, COLOR_RED, "You have failed to complete the mission."); DisablePlayerRaceCheckpoint(playerid); gPlayerRaceCheckpointStatus[playerid] = 0; return 1; } if(pvtime[playerid] > 0 && IsInTMis[playerid]==1) { new string[256]; SetVehicleParamsForPlayer(vid, playerid, 1, 0); format(string, 50, "~n~~n~~n~~n~~w~-You Got %d secs-", pvtime[playerid]); GameTextForPlayer(playerid, string, 1500, 3); } return 1; }
Note : Sorry for my bad english xD