Announcement Paintball - 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: Announcement Paintball (
/showthread.php?tid=529090)
Announcement Paintball -
Mititel - 31.07.2014
Hello !
How can you do when a number of players duel in Paintball occur for all server message like this: "At this time three players he fights in Paintball Arena"
sorry for my English
Re: Announcement Paintball -
AIped - 31.07.2014
first you need to make a way for the player to enter the arena.
lets say with a simple command..
Then make a global variable like this;
then each time a player makes a command you make the gpaintball variable count like this;
pawn Код:
CMD:(paintball ( or whatever command you like)
{
gpaintball++; // counts gpaintball up..so each time a player uses the command gpaintball will be +1
// now we want a message saying how many players (or actually gpaintball counts)
new msg[56];
format(msg,sizeof(msg),"players in paintball: %d",gpaintball);
SendClientMessageToAll(-1,msg); // replace -1 for any color
return 1;
}
make sure you do gpaintball--; when they leave. (you could do that with another command like /leavepaintball or something)
Re: Announcement Paintball -
Mititel - 31.07.2014
To me is just a command. (/ paintball)
And I public StartPaintball and public PaintballEnd.Unde will put messages?
Re: Announcement Paintball -
AIped - 31.07.2014
well..thats your choice where to put it but considering what you stated above the messages should be on startpaintball