Problem with Checkpoint!
#1

Even me who can help, the problem is as follows.
I want to make one piece for example race / setrace with which the players called to start the race and then when the players would come to that particular place appears to be his second CheckPoint. When would the players come to the CP wanted me to write nrp Player. Tomy ending race.

I am such a little, but not for me, I will not show in the end that the player came on goal.

****** Translate!

Код:
new CP[MAX_PLAYERS];
Код:
 	if (strcmp(cmd, "/setrace", true)==0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			if(!IsPlayerAdmin(playerid))
 	{
			  for(new i = 0; i < MAX_PLAYERS; i++)
				if(IsPlayerConnected(i))
				{
					SetPlayerCheckpoint(giveplayerid, 1467.6924,1240.3368,10.5270,10.0); // Tu stavite kordinate koje prve save znaci gdje zelite da bude start
					CP[i] = 606;
 					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "Organizator eventa %s je pozvao igrace na stratnu liniju!", sendername);
					SendClientMessageToAll(COLOR_LIGHTRED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, " Niste autorizirani za koristenje ove naredbe !");
			}
		}
		return 1;
	}
	return 0;
}
Код:
public OnPlayerEnterCheckpoint(playerid)
{
  if(CP[playerid] == 605) { CP[playerid] = 606; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1467.6924,1240.3368,10.5270,20.0); } //1
	else if(CP[playerid] == 607) { CP[playerid] = 608; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1390.0063,1418.9299,10.5266,50.0); } //2
	else if(CP[playerid] == 609)
	{
		CP[playerid] = 0;
 		DisablePlayerCheckpoint(playerid);
 		new playername[MAX_PLAYER_NAME];
 		GetPlayerName(playerid, playername, sizeof(playername));
		format(string, sizeof(string), "Race: %s je upravo zavrsio race. ", playername);
		SendClientMessageToAll(COLOR_LIGHTRED, string);
		return 1;
 	}
	else if(CP[playerid] == 606)
	{
	  CP[playerid] = 606;
 		DisablePlayerCheckpoint(CP[playerid] == 607);
 		SetPlayerCheckpoint(playerid, 1390.0063,1418.9299,10.5266);
 		new playername[MAX_PLAYER_NAME];
 		GetPlayerName(playerid, playername, sizeof(playername));
		format(string, sizeof(string), "Race: %s je upravo na startnoj liniji. ", playername);
		SendClientMessageToAll(COLOR_LIGHTRED, string);
		return 1;
 	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: