SA-MP Forums Archive
Need some Tips about " SendRconCommand("changemode x-x-x"); " - 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: Need some Tips about " SendRconCommand("changemode x-x-x"); " (/showthread.php?tid=578043)



Need some Tips about " SendRconCommand("changemode x-x-x"); " - SpikY_ - 16.06.2015

Hello,
I need some tips about SendRconCommand("changemode x-x-x");, I want some tips or want to know is this possible to changemode randomly from gamemodes Folder. Suppose, I have 20+ Gamemodes in gamemodes folder and i don't want to run them in sequence, i want them to change randomly.

is this possible to do it with SendRconCommand("changemode x-x-x"); ? If i add SendRconCommand in every gamemode to change so it will select in sequence. I think you understand what i'm trying to say.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - SecretBoss - 16.06.2015

-REMOVED-

Sorry I confused


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - SpikY_ - 16.06.2015

Tell me if you got any idea.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - Adarsh007 - 16.06.2015

Create & Use Timer and Remember to set the false to true so it will keep Repeating.

So Send Rcon Command One by One when Timer getting finished.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - SpikY_ - 16.06.2015

Not one by one. I want to select it randomly NOT in sequence.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - bgedition - 16.06.2015

If is randomly there is a big chance to load the same gamemode again. I have an idea with MySQL to save last loaded gamemode and this will prevent it from loading it for one time. I think you can understand?


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - shadowdog - 16.06.2015

You could try naming your gamemodes: Game-1, Game-2, Game-3 etc.
Then use the random function to select the new mode.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - SpikY_ - 16.06.2015

yeah. i want to know about the random functions. and @bgedition i am suck with MySQL and it will take much time for me to learn atm.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - J0sh... - 16.06.2015

Quote:
Originally Posted by NGEN123
Посмотреть сообщение
yeah. i want to know about the random functions. and @bgedition i am suck with MySQL and it will take much time for me to learn atm.
I would suggest stuff with the same name but numbers, then on a timer do this:
PHP код:
new gamemode[50];
format(gamemodesizeof(gamemode), "changemode namehere-%d"random(maxnumhere));
SendRCONCommand(gamemode); 
Something like that.


Re: Need some Tips about " SendRconCommand("changemode x-x-x"); " - SpikY_ - 16.06.2015

not possible with name instead of numbers? cause there are many gamemodes like racing, stealing, bombing gamemodes etc.