31.07.2018, 06:42
When i go to the checkpoint and nothing appears to OnPlayerEnterCheckpoint. It's a Blank Checkpoint.
Код:
forward HiddenTrailerMissions(playerid); public HiddenTrailerMissions(playerid) { if (GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 591) { new message[50]; HiddenTrailer_PlayerJob[playerid] = 1; SetPlayerCheckpoint(playerid, -1073.4313, -1306.4890, 129.2188, 15); SendClientMessage(playerid, HIDDEN, "You have found a hidden trailer!"); SendClientMessage(playerid, HIDDEN, "Deliver it to 'The Den'"); format(message,sizeof(message), "~w~Deliver the ~p~hidden trailer ~w~to ~r~'the den'"); PlayerTextDrawSetString(playerid, work[playerid], message); KillTimer(htimer); } return 1; }
Код:
public OnPlayerEnterCheckpoint(playerid) { if(GetPlayerTeam(playerid) == 1) { if (GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 591) { switch(HiddenTrailer_PlayerJob[playerid]) { case 1: { HiddenTrailer_PlayerJob[playerid] = -1; TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, HIDDEN, "You have delivered a hidden trailer!"); SendClientMessage(playerid, HIDDEN, "You recieved $10000 and 5 points"); GivePlayerMoney(playerid, 10000); SetPlayerScore(playerid, GetPlayerScore(playerid) + 5); SendClientMessageToAll(HIDDEN, "A hidden trailer has been delivered"); SetVehiclePos(GetVehicleTrailer(GetPlayerVehicleID(playerid)), 2940, -8288, -52); DisablePlayerCheckpoint(playerid); htimer = SetTimerEx("HiddenTrailerMissions", 2500, true, "i", playerid); print("Hidden Trailers Called"); } return 1; } } }