Robtimer help
#3

PHP Code:
new JustRobbed[MAX_PLAYERS]; 
PHP Code:
CMD:robbank(playerid,params[])
{
    if(
PlayerInfo[playerid][pVIP] == && JustRobbed[playerid] == 0)
    {
        if(
GetPlayerInterior(playerid) == 3)
        {
                new 
rand=75000 +(random(35000));
                new 
Pname[MAX_PLAYER_NAME];
                
GetPlayerName(playeridPnamesizeof(Pname));
                new 
str[100];
                                
JustRobbed[playerid] = 1;
                new 
str1[100];
                
format(str,sizeof(str),"You've robbed the bank and got $ %d from the robbery"rand);
                
format(str1,sizeof(str1)," %s has robbed the bank of Las Venturas and stole $ %d"Pnamerand);
                
SendClientMessageToAll(COLOR_ORANGE,str1);
                
SendClientMessage(playerid,COLOR_WHITE,str);
                
GivePlayerMoney(playeridrand);
                
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid) + 4);
                
SetTimer("RobTimer",300000,0);
        }
        else 
SendClientMessage(playerid,COLOR_RED,"You're not inside the bank to rob it.");
    }
    else 
SendClientMessage(playerid,COLOR_RED,"You're not a VIP Member to rob the bank.");
    return 
1;

PHP Code:
forward RobTimer(playerid);
public 
RobTimer(playerid)
{
    
SendClientMessage(playerid,COLOR_ORANGE,"You can now rob again.");
        
JustRobbed[playerid] = 0;
    return 
1;

Reply


Messages In This Thread
Robtimer help - by Escobabe - 28.09.2017, 20:18
Re: Robtimer help - by 10MIN - 28.09.2017, 20:26
Re: Robtimer help - by aoky - 28.09.2017, 20:41
Re: Robtimer help - by Kane - 28.09.2017, 20:50
Re: Robtimer help - by Escobabe - 28.09.2017, 21:08
Re: Robtimer help - by Swankeh - 28.09.2017, 22:53

Forum Jump:


Users browsing this thread: 1 Guest(s)