SA-MP Forums Archive
More random than this - 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: More random than this (/showthread.php?tid=590902)



More random than this - Face9000 - 05.10.2015

How to make this random GMX code....more random?

Код:
switch(random(2))
   {
        case 0: SendRconCommand("changemode HotRoom");
        case 1: SendRconCommand("changemode TheWarehouse");
   }



Re: More random than this - Beckett - 05.10.2015

Elaborate please, what do you mean by more random?

You want to include more gamemodes or what precisely?


Re: More random than this - Face9000 - 05.10.2015

I just wanna randomize more the code, like by random restarting for the first letter of the game name. Like (first we restart Test Game then Super Test Game)


Re: More random than this - XBrianX - 05.10.2015

You mean this?


PHP код:
// Changemode
  
forward Changemode();
  public 
Changemode()
 {
  new var = 
random(2);
  switch (var)
  {
   case 
0SendRconCommand("editthis");
   case 
1SendRconCommand("editthis!");
 }


And this under public OnGameModeInit()

PHP код:
{
    new 
string[42];
    
SetTimer("Changemode",1000,2); 
Rep me if i helped you.


Re: More random than this - XBrianX - 08.10.2015

Oh...


PHP код:
// Changemode
  
forward Changemode();
  public 
Changemode()
 {
  new var = 
random(3);
  switch (var)
  {
   case 
0SendRconCommand("editthis");
   case 
1SendRconCommand("editthis!");
   case 
2:SendRconCommand("editthis!");
 }

And this under public OnGameModeInit()

PHP код:
{
    new 
string[42];
    
SetTimer("Changemode",1000,2); 
Rep me if i helped you



Re: More random than this - XBrianX - 08.10.2015

If you want to add more mods then edit this

new var = random(Number);

and

case number:SendRconCommand("editthis!");


Re: More random than this - Mauzen - 08.10.2015

Quote:
Originally Posted by Face9000
Посмотреть сообщение
I just wanna randomize more the code, like by random restarting for the first letter of the game name. Like (first we restart Test Game then Super Test Game)
I still dont get anything, except that XBrianX's multiposts make absolutely no sense.