05.02.2017, 16:16
How can i make it dynamic CP?
like test[playerid] = CreateDynamicCP
First Load:
Second:
End Funtion part:
When he enter the cp
like test[playerid] = CreateDynamicCP
First Load:
Код:
SetPlayerCheckpoint(playerid, trucker[rand][lx], trucker[rand][ly], trucker[rand][lz], 10);
Код:
SetPlayerCheckpoint(playerid, trucker[end][ux], trucker[end][uy], trucker[end][uz], 10);
End Funtion part:
Код:
DisablePlayerCheckpoint(playerid);
Код:
public OnPlayerEnterCheckpoint(playerid) { new loading[MAX_PLAYERS]; if(GetPlayerTeam(playerid) == 1) { if(IsPlayerInAnyVehicle(playerid)) { switch(truck_PlayerJob[playerid]) { case 1: { truck_PlayerJob[playerid] = -1; TogglePlayerControllable(playerid, 0); SetTimerEx("Trucker2", 30000, false, "i", playerid); format(loading,sizeof(loading), "~y~Loading... ~g~Please wait..."); PlayerTextDrawSetString(playerid, work[playerid], loading); new Message[100]; format(Message,sizeof(Message), "Loading..."); SendClientMessage(playerid, WORK, Message); format(Message,sizeof(Message), "Please wait"); SendClientMessage(playerid, WORK, Message); } case 2, 3: { truck_PlayerJob[playerid] = 3; TogglePlayerControllable(playerid, 0); SetTimerEx("Trucker3", 30000, false, "i", playerid); format(loading,sizeof(loading), "~y~Unloading... ~g~Please wait..."); PlayerTextDrawSetString(playerid, work[playerid], loading); new Message[100]; format(Message,sizeof(Message), "Unloading..."); SendClientMessage(playerid, WORK, Message); format(Message,sizeof(Message), "Please wait"); SendClientMessage(playerid, WORK, Message); } } return 1; } } return 1; }