Random.
#1

Lets take a random cmd.
Код:
if(strcmp("/usepills", cmdtext, true, 10) == 0)
How do we change it into there will be a possibility of 10 things happening, when you type this.
It's random, you never know which one will happen.
EX : You die!
EX : You survive and get healed!
EX : You get high, due to a overdose!
You get my point.
Reply
#2

pawn Код:
new whathappens = random(10);
pawn Код:
if(whathappens == 10)
{
  // code
}
else
if(whathappens == 9)
{
  // code
}
...
Reply
#3

pawn Код:
switch(random(3))
{
    case 0: SetPlayerHealth(playerid, 0);
    case 1: SetPlayerHealth(playerid, 100);
    case 2: SetPlayerDrunkLevel(playerid, 5000);
}
Reply
#4

Cool, this might help me too.
Reply
#5

You could add some animations to the death chance also, to make it look cooler.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)