Update to Dynamic CP
#1

How can i make it dynamic CP?
like test[playerid] = CreateDynamicCP
First Load:
Код:
SetPlayerCheckpoint(playerid, trucker[rand][lx], trucker[rand][ly], trucker[rand][lz], 10);
Second:
Код:
SetPlayerCheckpoint(playerid, trucker[end][ux], trucker[end][uy], trucker[end][uz], 10);

End Funtion part:

Код:
DisablePlayerCheckpoint(playerid);
When he enter the cp
Код:
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;
}
Reply
#2

bump
Reply
#3

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)