Sort of /onduty command - 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: Sort of /onduty command (
/showthread.php?tid=639380)
Sort of /onduty command -
xLucy - 16.08.2017
NOTE: I'm no scripting newbie.
Everybody knows the LSRP onduty command, right? When every PD/SD/FD person goes onduty, the PD/SD/FD value increases by one.
How can I have it do that? I thought of doing this.
(ignore the indentation, im not going to indent it by spamming spacebar 4 times)
PHP код:
(TOP OF SCRIPT)
new FDPlayers;
new PDPlayers;
new SDPlayers;
then everytime somebody goes onduty, depending on their faction i would do FDPlayers++; or SDPlayers++; then when they go off-duty i would do FDPlayers = FDPlayers-1; or SDPlayers = SDPlayers-1; etc.
Would that work?
Re: Sort of /onduty command -
10MIN - 16.08.2017
Yes. Also here is a tip:
Код:
new Variable = 10;
//You can use this:
Variable--; //To decrease a variable.
//Which basically means:
Variable= Variable - 1;