Interior Checkpoints
#1

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

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

https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
Reply
#3

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

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 ?
Reply
#5

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

Код:
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?
Reply
#7

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

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.
Reply
#9

i also need help in this
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)