SA-MP Forums Archive
CP Switch - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: CP Switch (/showthread.php?tid=65279)



CP Switch - SuperS0nic - 11.02.2009

Код:
forward public CPS_OnPlayerEnterCheckpoint(playerid);
public CPS_OnPlayerEnterCheckpoint(playerid)
{
 new cpid = CPS_GetPlayerCheckpoint(playerid);
 switch(cpid)
	{
	  case 0:
 if(CPS_IsPlayerInCheckpoint(playerid,cpid) == BIGCASINOENTER)
 {
 	SetPlayerPos(playerid,2015.5150,1017.2267,996.8750);
 	 SetPlayerInterior(playerid, 10);
 }
 case 1:
  if(CPS_IsPlayerInCheckpoint(playerid,cpid) == BIGCASINOEXIT)
 {
   SetPlayerPos(playerid,-1531.2820,785.2709,7.2685);
 	 SetPlayerInterior(playerid, 0);

 }
 case 2: {
 if(CPS_IsPlayerInCheckpoint(playerid,cpid) == HIGHCASINOENTER)
 {
   SetPlayerPos(playerid,1133.3081,-10.0729,1000.6797);
 	 SetPlayerInterior(playerid, 10);

 }
 case 3: {
 if(CPS_IsPlayerInCheckpoint(playerid,cpid) == HIGHCASINOEXIT)
 {
  
  SetPlayerPos(playerid,-1966.9148,344.0982,35.3441);
 	 SetPlayerInterior(playerid, 0);
 }
 case 4: {
  if(CPS_IsPlayerInCheckpoint(playerid,cpid) == SFPDENTER)
 {
   	 
   	 SetPlayerPos(playerid,246.40,110.84,1003.22);
 	 SetPlayerInterior(playerid, 10);

 }
 case 5: {
  if(CPS_IsPlayerInCheckpoint(playerid,cpid) == SFPDEXIT)
 {
   SetPlayerPos(playerid,-1604.3490,714.3841,12.9227);
 	 SetPlayerInterior(playerid, 0);
 }

 return 1;
}
Why isnt the functions working? i see the checkpoints but it doesnt happen anything. (im using this for 2 casinos and SFPD)


Re: CP Switch - Grove - 11.02.2009

Код:
forward public CPS_OnPlayerEnterCheckpoint(playerid);
Remove the public part.


Re: CP Switch - SuperS0nic - 11.02.2009

Doesnt help.


Re: CP Switch - Mikep - 11.02.2009

what CP streamer is it?


Re: CP Switch - SuperS0nic - 11.02.2009

http://forum.sa-mp.com/index.php?topic=35977.0


Re: CP Switch - Mikep - 11.02.2009

Try using one that works.
Look in my sig.