5 people in a 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: 5 people in a checkpoint (
/showthread.php?tid=200434)
5 people in a checkpoint -
nuriel8833 - 18.12.2010
Hello
I tried many times to do the following thing,but I couldn't:
I want that when 5 people will be in 1 checkpoint,A specific object will move (MoveObject)
I tried that several times,but it didn't work (I deleted all the previous codes)
Can somebody help me
Thanks
Re: 5 people in a checkpoint -
XePloiT - 18.12.2010
pawn Код:
new cpcount=0;
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid==/*you ch id*/)
{
cpcount++;
if(cpcount==5)
{
//...
}
//...
}
return 1;
}
public OnPlayerLeaveDynamicCP(playerid, checkpointid)
{
if(checkpointid==/*you ch id*/)
{
cpcount--;
//...
}
return 1;
}
Re: 5 people in a checkpoint -
nuriel8833 - 18.12.2010
Quote:
Originally Posted by XePloiT
pawn Код:
new cpcount=0; public OnPlayerEnterDynamicCP(playerid, checkpointid) { if(checkpointid==/*you ch id*/) { cpcount++; if(cpcount==5) { //... } //... } return 1; } public OnPlayerLeaveDynamicCP(playerid, checkpointid) { if(checkpointid==/*you ch id*/) { cpcount--; //... } return 1; }
|
I don't have those publics in the mode..
I need to add them?
Quote:
Originally Posted by [HLF]Southclaw
That's IF he's using the streamer, if not then the code would be different.
|
I am using MidoStream
Is that makes any diffrences?
Re: 5 people in a checkpoint -
XePloiT - 18.12.2010
use
Incognito's streamer
Re: 5 people in a checkpoint -
nuriel8833 - 18.12.2010
I'll think about that
But every streamer has its own publics,right?
Sorry about the stupid questions I came back to scripting after 8 months of a brake xDD
Re: 5 people in a checkpoint -
XePloiT - 18.12.2010
yes usually, hm... the callback from my script example... its from the streamer i gave you...
i recommend this one...
any way suit yourself :]