how make random run function
#1

how make random run function?
I haveEXAMPLE)

Код:
forward mes();
public mes()
{
SendClientMessageToAll(color,"mes func");
}

forward sem();
public sem()
{
SendClientMessageToAll(color,"sem function");
}

forward goga();
public goga()
{
SendClientMessageToAll(color,"goga func");
}
how make To run these functions randomly from commands?
if not understand tell me, i edit message Please Help me..
Reply
#2

Do they really need to be public functions?

pawn Код:
switch (random(3))
{
  case 0 : mes();
  case 1 : sem();
  case 2 : goga();
}
If you want to call those functions from another script, use CallRemoteFunction.
Reply
#3

thanks
Reply
#4

Quote:
Originally Posted by 0rb
Do they really need to be public functions?

pawn Код:
switch (random(3))
{
  case 0 : mes();
  case 1 : sem();
  case 2 : goga();
}
If you want to call those functions from another script, use CallRemoteFunction.
that is right guillaume
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)