CnR Minigame
#6

pawn Код:
if(PlayerInfo[i][RobberyTimer] < 1 && PlayerInfo[i][pIsRobbing] == 1 && robbery[0])
            {
                PlayerInfo[i][RobberyTimer]--;
                format(string,sizeof(string),"Robbery in progress, Completing in %i seconds!",PlayerInfo[i][RobberyTimer]);
                GameTextForPlayer(i,string,3000,5);
            }
try to replace

pawn Код:
PlayerInfo[i][RobberyTimer]--;
by :

pawn Код:
PlayerInfo[i][RobberyTimer] =1;
and you'll see that it's work, because : PlayerInfo[i][RobberyTimer] is a variable, and when you do this :

pawn Код:
else if(PlayerInfo[i][RobberyTimer] == 1 && robbery[0])
            {
                new mrand = random(25000);
                PlayerInfo[i][RobberyTimer] = 0;
                PlayerInfo[i][pIsRobbing] = 0;
                format(string,sizeof(string),"[CNR] "GREEN"%s(%d) has robbed a total amount of $%i from San Fierro Train Station!",GetName(i),i,mrand);
                SendMessageToAllCnRPlayers(COLOR_SERVER,string);
                GivePlayerMoney(i,mrand);
                SetPlayerScore(i,GetPlayerScore(i)+2);
            }
it's checking if the variable = 1, if it's 1, it start the robbery.
Reply


Messages In This Thread
CnR Minigame - by biker122 - 25.04.2014, 08:57
Re: CnR Minigame - by biker122 - 25.04.2014, 12:13
Re : CnR Minigame - by Ramoboss - 25.04.2014, 12:27
Re: CnR Minigame - by biker122 - 25.04.2014, 12:39
Re: CnR Minigame - by biker122 - 25.04.2014, 13:17
Re : CnR Minigame - by Ramoboss - 25.04.2014, 13:29
Re: CnR Minigame - by biker122 - 25.04.2014, 13:33
Re : CnR Minigame - by Ramoboss - 25.04.2014, 13:35
Re: CnR Minigame - by biker122 - 25.04.2014, 13:39
Re: CnR Minigame - by awsomedude - 25.04.2014, 13:50

Forum Jump:


Users browsing this thread: 3 Guest(s)