SA-MP Forums Archive
Interior Checkpoints - 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)
+--- Thread: Interior Checkpoints (/showthread.php?tid=430738)



Interior Checkpoints - ShaneOvSina - 15.04.2013

Hi,
I Was looking how to make something like this
If anyone Could help i would appreciate it.


Re: Interior Checkpoints - SilverKiller - 15.04.2013

https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint

https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint


Re: Interior Checkpoints - ShaneOvSina - 15.04.2013

Could you please help me more?
I've tryed it and i can only add 1 checkpoint the others dont show up.


Re: Interior Checkpoints - DaTa[X] - 15.04.2013

use this plugin/include : https://sampforum.blast.hk/showthread.php?tid=102865
and make a cp like this
pawn Код:
new CP1;
new CP2;
new CP3;
public OnGameModeInit()
{
 CP1 = CreateDynamicCP(220.5612,1423.4796,10.5859,3, -1,-1,-1,100.0);
 CP2 = CreateDynamicCP(599.6351,1247.6184,11.7188,3, -1,-1,-1,100.0);
 CP3 = CreateDynamicCP(14.6718,1549.8481,12.7672,3,-1,-1,-1,100.0);
}
[/pawn]

and dont forget the callbacks
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
   if(checkpointid == CP1)
     {
        SendClientMessage(playerid,-1," CP1");
      }
   if(checkpointid == CP2)
   {
      SendClientMessage(playerid,-1,"CP2");
    }
   if(checkpointid == CP3)
   {
    SendClientMessage(playerid,-1,"CP3");
    }
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
   if(checkpointid == CP1)
    {
       SendClientMessage(playerid,-1,"you left checkpoint  CP1");
    }
    if(checkpointid == CP2)
    {
       SendClientMessage(playerid,-1,"you left checkpoint  CP2");
    }
    if(checkpointid == CP3)
    {
       SendClientMessage(playerid,-1,"you left checkpoint  CP3");
    }
}
edit : you got it now ?


Re: Interior Checkpoints - ShaneOvSina - 15.04.2013

Im Sorry.
Could you make a Example for me?
Im Still not getting it.


Re: Interior Checkpoints - ShaneOvSina - 15.04.2013

Код:
C:\Documents and Settings\Other Users\Desktop\Shanes Server\gamemodes\Server.pwn(103) : error 017: undefined symbol "CreateDynamicCP"
C:\Documents and Settings\Other Users\Desktop\Shanes Server\gamemodes\Server.pwn(104) : error 017: undefined symbol "CreateDynamicCP"
C:\Documents and Settings\Other Users\Desktop\Shanes Server\gamemodes\Server.pwn(105) : error 017: undefined symbol "CreateDynamicCP"
C:\Documents and Settings\Other Users\Desktop\Shanes Server\gamemodes\Server.pwn(596) : warning 235: public function lacks forward declaration (symbol "OnPlayerEnterDynamicCP")
C:\Documents and Settings\Other Users\Desktop\Shanes Server\gamemodes\Server.pwn(612) : warning 235: public function lacks forward declaration (symbol "OnPlayerLeaveDynamicCP")
C:\Documents and Settings\Other Users\Desktop\Shanes Server\gamemodes\Server.pwn(618) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Код:
	CP1 = CreateDynamicCP(2194.0273,1990.7640,11.9220,3, -1,-1,-1,100.0);//Line 103
        CP2 = CreateDynamicCP(2196.2295,1676.3077,11.9922,3, -1,-1,-1,100.0);//Line 104
 	CP3 = CreateDynamicCP(14.6718,1549.8481,12.7672,3,-1,-1,-1,100.0);//Line 105
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)//Line 596
{
   if(checkpointid == CP1)
     {
        SendClientMessage(playerid,-1," CP1");
      }
   if(checkpointid == CP2)
   {
      SendClientMessage(playerid,-1,"CP2");
    }
   if(checkpointid == CP3)
   {
    SendClientMessage(playerid,-1,"CP3");
    }
}

public OnPlayerLeaveDynamicCP(playerid, checkpointid)//Line 612
{
   if(checkpointid == CP1)
    {
       SendClientMessage(playerid,-1,"you left checkpoint  CP1");
    }
    if(checkpointid == CP2)//Line 618
    {
       SendClientMessage(playerid,-1,"you left checkpoint  CP2");
    }
    if(checkpointid == CP3)
    {
       SendClientMessage(playerid,-1,"you left checkpoint  CP3");
    }
}
Any Suggestions?


Re : Interior Checkpoints - DaTa[X] - 15.04.2013

i told you to download the include before using my code
streamer include : https://sampforum.blast.hk/showthread.php?tid=102865


Re: Interior Checkpoints - MP2 - 15.04.2013

See 'IEE' in my signature. It uses yellow arrows, just like default interiors. I wouldn't personally use checkpoints as they look out of place.


Re: Interior Checkpoints - ppapppap - 07.03.2019

i also need help in this


Re: Interior Checkpoints - EmpireSk - 07.03.2019

I'll help you ... but tell me more about your problem and maybe give me the code