player have 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)
+--- Thread: player have checkpoint (
/showthread.php?tid=559586)
player have checkpoint -
mamalzeus - 24.01.2015
Hi!
i want to say
if player have checkpoint don't get new checkpoint
for example i have checkpoint and i choose a job in jobs list and send me error : you already have an checkpoint.
Re: player have checkpoint -
lollypap54 - 24.01.2015
When player choose a checkpoint, give integer to them. Like this :
new cp[MAX_PLAYERS]
...
if(cp[pid]==0){
showcheckpoint blablabla;
cp[pid]=1;}
else { sendclientmessage(bla, bla, "you arleady have checkpointbal"); }
Now do checkpoint delete command
CMD:checkpointdelete(blala){
if(cp[pid]==1){
notshowcheckpointhere
cp[pid]=0;}
Hope understand how do it.
Re: player have checkpoint -
mamalzeus - 24.01.2015
Quote:
Originally Posted by lollypap54
When player choose a checkpoint, give integer to them. Like this :
new cp[MAX_PLAYERS]
...
if(cp[pid]==0){
showcheckpoint blablabla;
cp[pid]=1;}
else { sendclientmessage(bla, bla, "you arleady have checkpointbal"); }
Now do checkpoint delete command
CMD:checkpointdelete(blala){
if(cp[pid]==1){
notshowcheckpointhere
cp[pid]=0;}
Hope understand how do it.
|
i say
new cp[MAX_PLAYERS] == 0;
...
if(cp == 1)
{
SCM(playerid, Color_X,"You already have checkpoint");
return 1; }
but
I get checkpoint then i change my job - it should be say = error : You already have checkpoint
but
when i change my job , checkpoint will be change . . .
i don't know

and i don't have any error when i compile it :/