Checkpoint help
#8

Quote:
Originally Posted by Swift_
Test the code I gave you.
I'm having trouble with the code you gave me, So i searched and found something else.

Heres the code:

Код:
new CP[MAX_PLAYERS];
(OnPlayerSpawn)
Код:
	if(CP[playerid] != 0) return 1;
  CPS_AddCheckpoint(2036.4734, -1402.9043,17.2983, 3.0,100); //hospital
  CP[playerid] = 1;
  
 	if(CP[playerid] != 1) return 1;
  CPS_AddCheckpoint(3867.2412, -1601.9069,1441.6368, 3.0,100);
 	CP[playerid] = 2;
  return 1;
}
Код:
public OnPlayerEnterCheckpoint(playerid)
{
   if(CP[playerid] == 1)
   {
    GameTextForPlayer(playerid, "~w~Welcome to the Hospital, Type /Heal to heal your HP! it costs $100 ~G~", 5000, 5);
   }
   else if(CP[playerid] == 2)
   {
     GameTextForPlayer(playerid, "~w~Welcome to the Weapon shop, Type /weapons to get weapons!~G~", 5000, 5);
   } 
   CP[playerid] = 0;
   return 1;
}
I got it from here:
http://forum.sa-mp.com/index.php?topic=77156.0

The problem i'm having is, When i enter the checkpoint (for the first time) it displays what i want it to, but after that it doesnt display it at all

Reply


Messages In This Thread
Checkpoint help - by killdahobo99 - 23.06.2009, 00:31
Re: Checkpoint help - by Grim_ - 23.06.2009, 03:03
Re: Checkpoint help - by killdahobo99 - 23.06.2009, 15:18
Re: Checkpoint help - by Grim_ - 23.06.2009, 15:22
Re: Checkpoint help - by Vince - 23.06.2009, 15:32
Re: Checkpoint help - by killdahobo99 - 23.06.2009, 15:37
Re: Checkpoint help - by Grim_ - 23.06.2009, 15:38
Re: Checkpoint help - by killdahobo99 - 23.06.2009, 16:05
Re: Checkpoint help - by Grim_ - 23.06.2009, 16:08
Re: Checkpoint help - by killdahobo99 - 23.06.2009, 16:17

Forum Jump:


Users browsing this thread: 1 Guest(s)