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



Checkpoints - Lidor124 - 29.03.2014

Hey
I would like to ask if is there any function to disable automatically when player enter checkpoint it will DisablePlayerCheckpoint(playerid);

If you are a cop - if(PlayerInfo[playerid][pMember] == 1)
and you enter to a specific checkpoint i made, if you are a cop it will disable checkpoint, if you are a normal player so it won't disable the checkpoint when u enter it and it will SendClientMessage(playerid, -1, "You are not a cop!"); and the checkpoint keep showing.

Thanks.


Re: Checkpoints - TomatoRage - 29.03.2014

use SetPlayerCheckpoint
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
     if(PlayerInfo[playerid][pMember] == 1)
     {
        DisablePlayerCheckpoint(playerid);
      }
     SendClientMessage(playerid,-1,"Your Not a cop");
}
if thats what you mean!


Re: Checkpoints - Lidor124 - 29.03.2014

Quote:
Originally Posted by TomatoRage
Посмотреть сообщение
use SetPlayerCheckpoint
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
     if(PlayerInfo[playerid][pMember] == 1)
     {
        DisablePlayerCheckpoint(playerid);
      }
     SendClientMessage(playerid,-1,"Your Not a cop");
}
if thats what you mean!
Read again. that isn't what i meant.


Re: Checkpoints - TomatoRage - 29.03.2014

Your searching a function ?
try this :SetPlayerCheckpoint


Re: Checkpoints - Lidor124 - 29.03.2014

Quote:
Originally Posted by TomatoRage
Посмотреть сообщение
Your searching a function ?
try this :SetPlayerCheckpoint
You know i already know this function but how to make what i have written in my first post?


Re: Checkpoints - TomatoRage - 29.03.2014

Quote:
Originally Posted by Lidor124
Посмотреть сообщение
You know i already know this function but how to make what i have written in my first post?
What do you mean exactly can you explain more


Re: Checkpoints - Lidor124 - 29.03.2014

Quote:
Originally Posted by TomatoRage
Посмотреть сообщение
What do you mean exactly can you explain more
The point is when you enter a checkpoint and you are not a cop so the checkpoint won't disappear.
In samp usually when you enter a checkpoint the checkpoint dissappers automatically so how do i disable it?


Re: Checkpoints - EiresJason - 29.03.2014

I've read through this thread and from what I got from it, TomatoRage posted the answer in the first reply.

The checkpoint won't disappear until you disable it using DisablePlayerCheckpoint(playerid);

Unless you created a DynamicCP.