Scripting related questions..
#5

Quote:
Originally Posted by Dokins
Посмотреть сообщение
That's still pretty confusing tbh. Can you be a little more clear? Also why is the random(100)? And not 10 like why is it not if num = 1
Random(10);
I just gave an example, it also could be random(10) aswell, chance is still 10%. What I told was something like that;

pawn Код:
new player_Status[MAX_PLAYERS], player_Timer[MAX_PLAYERS];

CMD:hotwire(playerid, params[])
{
      player_Status[playerid] = 1;
      player_Timer[playerid] = SetTimerEx("aFewSecondsTimer", 5000, true, "i", playerid);
}

forward aFewSecondsTimer(playerid);
public aFewSecondsTimer(playerid)
{
      if(player_Status[playerid] == 1)
      {
          blablablabla
          player_Status[playerid] = 2;
      }
      else if(player_Status[playerid] == 2)
      {
          blablablabla
          player_Status[playerid] = 3
      }
      else if(player_Status[playerid] == 3)
      {
          blablablabla
          KillTimer(player_Timer[playerid]);
      }
}
Reply


Messages In This Thread
Scripting related questions.. - by Dokins - 17.03.2014, 08:03
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 08:16
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:29
Re: Scripting related questions.. - by Raisingz - 17.03.2014, 08:41
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 08:43
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:43
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 08:46
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:49
Re: Scripting related questions.. - by Dokins - 17.03.2014, 08:54
Re: Scripting related questions.. - by Calabresi - 17.03.2014, 09:00

Forum Jump:


Users browsing this thread: 1 Guest(s)