SA-MP Forums Archive
RobBank System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: RobBank System (/showthread.php?tid=225009)



RobBank System - GeonMake - 12.02.2011

someone has a robbank system?


Re: RobBank System - Tigerkiller - 28.11.2011

more details ?

// ****** is your friend


Re: RobBank System - -CaRRoT - 28.11.2011

Something like that ?

PHP код:
    if(strcmp(cmd"/robbank"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
robbing[playerid] == 1)
            {
                
SendClientMessage(playeridCOLOR_GREY" You are already robbing the bank, please slow down");
                return 
1;
            }
            if(
alreadyrobbed[playerid] == 1)
            {
                
SendClientMessage(playeridCOLOR_WHITE"You already robbed the bank! Wait 1 hour.");
                return 
1;
               }
            if(!
IsPlayerInRangeOfPoint(playerid5.02308.8071,-13.2485,26.7422)) // Change X Y Z to the location you want
            
{
                
SendClientMessage(playeridCOLOR_GREY"   You are not at the bank !");
                return 
1;
            }
                    
SendClientMessage(playeridCOLOR_WHITE" You started to rob the bank, This will take 10 minutes");
                    
SetTimerEx("bankrob"600000false"i"playerid);
                    
robbing[playerid] = 1;
                    
SendClientMessageToAll(COLOR_ORANGE"||----------Latest News----------||");
                    
SendClientMessageToAll(COLOR_WHITE" The bank is currently getting robbed.");
                    
SendClientMessageToAll(COLOR_WHITE" We are currently waiting for the cops");
                    
SendClientMessageToAll(COLOR_WHITE" We will report more when we get more information");
                    
SendClientMessageToAll(COLOR_ORANGE"||----------Latest News----------||");
                    return 
1;
                }
            } 
and add this to the top :

PHP код:
forward bankrob(playerid);
forward robbedoff(playerid); 
Then

PHP код:
public bankrob(playerid)
{
    
SendClientMessage(playeridCOLOR_WHITE" Your finished robbing the bank, Run now");
    
GivePlayerMoney(playerid500000);
    
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]+500000;
    
alreadyrobbed[playerid] = 1;
    
robbing[playerid] = 0;
    
SetTimerEx("robbedoff"3600000false"i"playerid);
    
SendClientMessageToAll(COLOR_ORANGE"||----------Latest News----------||");
    
SendClientMessageToAll(COLOR_WHITE" It looks like the bankrobber got the cash.");
    
SendClientMessageToAll(COLOR_WHITE" The cops is currently waiting outside.");
    
SendClientMessageToAll(COLOR_ORANGE"||----------Latest News----------||");
    return 
1;
}
public 
robbedoff(playerid)
{
    
alreadyrobbed[playerid] = 0;
    
SendClientMessage(playeridCOLOR_WHITE" You can now rob the bank again");
    return 
1;




Re: RobBank System - Persique - 27.06.2013

Please tell me where to put this code ؟؟؟


Re: RobBank System - Pottus - 27.06.2013

Where did you swipe that snippet carrot? It has some obvious bugs at first glance.... looks like Ravens Roleplay.