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



Marker / Checkpoint - Dol - 13.04.2009

Hey, I want to make a red checkpoint on the ground where people have to get in and type a command like: /playdm, if they are out of the checkpoint they can't do the command. Also a red marker on the place where it is.

Please help!


Re: Marker / Checkpoint - Dol - 13.04.2009

Please!

(Shameless bump)


Re: Marker / Checkpoint - NtCat - 13.04.2009

First, add a checkpoint:
Код:
public OnPlayerConnect(playerid)
{
SetPlayerCheckpoint(playerid,X,Y,Z,size);
}
then in the command:
Код:
if(!IsPlayerInCheckpoint(playerid)) return SendClientMessage(playerid,color,"You arenґt in the checkpoint!");
Or something like this.


Re: Marker / Checkpoint - Dol - 13.04.2009

But don't I need to specify the checkpoint like HockeyCheckpoint cause now it's for ALL checkpoints right?


Re: Marker / Checkpoint - NtCat - 13.04.2009

Yes, you can use the checkpoint streamer (search on this forum, I havenґt used it so far so I donґt know how to do it with it), or make a variable ActualCheckpoint[MAX_PLAYERS] or something like that, in OnPlayerConnect: ActualCheckpoint[playerid] = 0; and OnPlayerEnterCheckpoint: if(IsPlayerInSphere(...)) ActualCheckpoint[playerid] = 1; or something. Try it, or try the streamer.