Robbery help
#1

I am using the FS: Bank Robbery System by Stereotype: https://sampforum.blast.hk/showthread.php?tid=482079

and I have pasted his code in my PAWN and when I am going to Compile it this error messages pops up:
PHP код:
filterscripts\bankrobbery.pwn(28) : warning 235: public function lacks forward declaration (symbol "RobbingTD")
filterscripts\bankrobbery.pwn(32) : error 017undefined symbol "TDInfo"
filterscripts\bankrobbery.pwn(32) : warning 215expression has no effect
filterscripts
\bankrobbery.pwn(32) : error 001expected token";"but found "]"
filterscripts\bankrobbery.pwn(32) : error 029invalid expressionassumed zero 
and here is the whole FS
PHP код:
 #include <a_samp>
    #include <zcmd>
    
new hBankRobbery[MAX_PLAYERS];
    new 
robbingbank[MAX_PLAYERS];
    new 
Text:RobbingTD0[MAX_PLAYERS]; // textdraws for robbing
    
new Text:RobbingTD1[MAX_PLAYERS]; // textdraws for robbing
    
new Text:RobbingTD2[MAX_PLAYERS]; // textdraws for robbing
    
forward BankRobbing(pv);
    
forward RobbingTextdraw(playeridcreate);
    
enum tdInfo
    
{
            
tdRobbingTD0,
            
tdRobbingTD1,
            
tdRobbingTD2,
    };
    public 
OnPlayerConnect(playerid)
    {
          
hBankRobbery[playerid] = -1;
          return 
1;
    }
    public 
RobbingTD(playeridcreate)
    {
            if(
create == 1)
            {
                if(
TDInfo[playerid][tdRobbingTD0] == 0)
                {
                    
RobbingTD0[playerid] = TextDrawCreate(259.000000199.000000"~w~");
                            
TextDrawBackgroundColor(RobbingTD0[playerid], 255);
                            
TextDrawFont(RobbingTD0[playerid], 1);
                            
TextDrawLetterSize(RobbingTD0[playerid], 1.3000004.000000);
                            
TextDrawColor(RobbingTD0[playerid], -1);
                            
TextDrawSetOutline(RobbingTD0[playerid], 0);
                            
TextDrawSetProportional(RobbingTD0[playerid], 0);
                            
TextDrawSetShadow(RobbingTD0[playerid], 1);
                            
TDInfo[playerid][tdRobbingTD0] = 1;
                    }
                if(
TDInfo[playerid][tdRobbingTD1] == 0)
                {
                            
RobbingTD1[playerid] = TextDrawCreate(420.000000242.000000"_");
                            
TextDrawBackgroundColor(RobbingTD1[playerid], 255);
                            
TextDrawFont(RobbingTD1[playerid], 1);
                            
TextDrawLetterSize(RobbingTD1[playerid], 0.500000, -7.000000);
                            
TextDrawColor(RobbingTD1[playerid], -1);
                            
TextDrawSetOutline(RobbingTD1[playerid], 0);
                            
TextDrawSetProportional(RobbingTD1[playerid], 1);
                            
TextDrawSetShadow(RobbingTD1[playerid], 1);
                            
TextDrawUseBox(RobbingTD1[playerid], 1);
                            
TextDrawBoxColor(RobbingTD1[playerid], 150);
                            
TextDrawTextSize(RobbingTD1[playerid], 219.00000090.000000);
                            
TDInfo[playerid][tdRobbingTD1] = 1;
                    }
                if(
TDInfo[playerid][tdRobbingTD2] == 0)
                {
                            
RobbingTD2[playerid] = TextDrawCreate(318.000000188.000000"~y~Robbing...");
                            
TextDrawAlignment(RobbingTD2[playerid], 2);
                            
TextDrawBackgroundColor(RobbingTD2[playerid], 255);
                            
TextDrawFont(RobbingTD2[playerid], 1);
                            
TextDrawLetterSize(RobbingTD2[playerid], 0.3499991.000000);
                            
TextDrawColor(RobbingTD2[playerid], 16711935);
                            
TextDrawSetOutline(RobbingTD2[playerid], 0);
                            
TextDrawSetProportional(RobbingTD2[playerid], 1);
                            
TextDrawSetShadow(RobbingTD2[playerid], 1);
                            
TDInfo[playerid][tdRobbingTD2] = 1;
                    }
            }
            else
            {
                if(
TDInfo[playerid][tdRobbingTD0] == 1)
                {
                    
TextDrawHideForPlayer(playeridRobbingTD0[playerid]);
                            
TextDrawDestroy(RobbingTD0[playerid]);
                            
TDInfo[playerid][tdRobbingTD0] = 0;
                    }
                if(
TDInfo[playerid][tdRobbingTD1] == 1)
                {
                    
TextDrawHideForPlayer(playeridRobbingTD1[playerid]);
                            
TextDrawDestroy(RobbingTD1[playerid]);
                            
TDInfo[playerid][tdRobbingTD1] = 0;
                    }
                if(
TDInfo[playerid][tdRobbingTD2] == 1)
                {
                    
TextDrawHideForPlayer(playeridRobbingTD2[playerid]);
                            
TextDrawDestroy(RobbingTD2[playerid]);
                            
TDInfo[playerid][tdRobbingTD2] = 0;
                    }
            }
            return 
1;
    }
    public 
BankRobbing(pv)
    {
            if(!
IsPlayerConnected(p)) return KillTimer(robbingbank[p]);
            if(
hBankRobbery[p] == -1) return KillTimer(robbingbank[p]);
            
hBankRobbery[p]++;
            if(
hBankRobbery[p] == 1TextDrawSetString(RobbingTD0[p], "~w~I");
            else if(
hBankRobbery[p] == 2TextDrawSetString(RobbingTD0[p], "~w~II");
            else if(
hBankRobbery[p] == 3TextDrawSetString(RobbingTD1[p], "~w~III");
            else if(
hBankRobbery[p] == 4TextDrawSetString(RobbingTD2[p], "~w~IIII");
            else if(
hBankRobbery[p] == 5TextDrawSetString(RobbingTD3[p], "~w~IIIII");
            else if(
hBankRobbery[p] == 6)
            {
                new 
random(5);
                switch(
x)
                {
                    case 
0..1:
                    {
                                    
TextDrawSetString(ObijanjeTD0[p], "~r~IIIII");
                                    
TextDrawSetString(ObijanjeTD2[p], "~r~Bank is not robbed!");
                                    
TogglePlayerControllable(p1);
                                    
StopLoopingAnim(p);
                                    
SencClientMessage(p, -1"Bank is not robbed!");
                            }
                            case 
2..4:
                            {
                                    
TextDrawSetString(RobbingTD0[p], "~r~IIIII");
                                    
TextDrawSetString(RobbingTD2[p], "~g~Bank is succesfuly robbed!");
                                    
TogglePlayerControllable(p1);
                                    
StopLoopingAnim(p);
                                    
SendClientMessage(p, -1"Bank is robbed!");
                                    new 
cash 30000;
                                    new 
bribe random(5000);
                                    
SendClientMessage(p, -1"You stoled $%d from the bank!"cash+bribe);
                                    
GivePlayerMoney(pcash+bribe);
                            }
                    }
            }
            else if(
hBankRobbery[p] == 7)
            {
                    
KillTimer(robbingbank[p]);
                    
hBankRobbery[p] = -1;
            }
            return 
1;
    }
    
CMD:robbank(playeridparams[])
    {
            if(
gettime() < hBankRobbery[playerid]) return SendClientMessage(playerid, -1"You already robbed bank!");
            if(!
IsPlayerInRangeOfPoint(playerid3.0xyz)) return SCM(playerid, -1"You are not in the bank!"); // Put x,y,z where is your bank
            
LoopingAnim(playerid,"BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
            
hBankRobbery[playerid] = 0;
            
robbingbank[playerid] = SetTimerEx("robbingbank"20000true"ii"playerid);
            
ObijanjeTD(playerid1);
            
SendClientMessageToAll(-1,"[NEWS] Bank is being robbed, do not come near the bank!");
            
TextDrawShowForPlayer(playeridObijanjeTD0[playerid]);
            
TextDrawShowForPlayer(playeridObijanjeTD1[playerid]);
            
TextDrawShowForPlayer(playeridObijanjeTD2[playerid]);
            
hBankRobbery[playerid] = gettime() + 15000;
            return 
1;
    } 
If someone can help me, please do it!
Reply
#2

helpppp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)