Help notify Cops with bank robbery system
#1

Help im trying to make it so when people do /robbank it alerts cops i downloaded a code and it said "//Put your thing that will notify cops here" So i did but i get errors.

Code :

Код:
    /*
    This script/application is created by UnlimitedDeveloper from SAMP forums
    and it's supposed to be shared only at SAMP forums, nowhere else!
    If any copy of this script is found on another forum, it will be taken down.
    */
    #include <a_samp>
    #include <zcmd>

    #define COLOR_WHITE 0xFFFFFFAA

    //Function forwarding
    /*
    Firstly we have to forward the functions that we are going
    to use later in our sript.
    */
    forward robtimer(playerid);
    forward waittimer();

    //Variables
    /*
    We are adding a NEW Variable so we can determine wether the bank
    can or cannot be robber at a certain time.
    */
    new robpossible;

    public OnFilterScriptInit()
    {
            /*
            When the filterscript executes itself it's setting the 'robpossible'
            variable to 1 which means that we can rob the bank right after we login.
            */
            robpossible = 1;
            return 1;
    }

    //Command(s)
    CMD:robbank(playerid, params[])
    {
            if(robpossible == 1) //If the bank can be robbed we continue below
            {
                    if(IsPlayerInRangeOfPoint(playerid, 3.0, 2309.1899,-8.4444,26.7422))
                    {//Next thing we do is, we check if we are at the bank interior ^^
                        robpossible = 0; //Then we set the bank so it cannot be robbed
                        SetTimer("waittimer", 800000, false); //Normal Mode 5 minutes
                        /*We run the timer(5 minutes) for the function that is going to make the
                        bank available for robbing again
                        */
                        //SetTimer("waittimer", 65000, false); //Test Mode 65 seconds
                        SetTimer("robtimer", 76000, false);
                        SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
				    format(string, sizeof(string), "A silent Alarm has been triggered of at the bank ALL Units Respond Now"
				    SendRadioMessage(1, DEPTRADIO, string);
					SendRadioMessage(2, DEPTRADIO, string);
					SendRadioMessage(3, DEPTRADIO, string);
					SendRadioMessage(5, DEPTRADIO, string);
					SendRadioMessage(7, DEPTRADIO, string);
					SendRadioMessage(11, DEPTRADIO, string);
					SendRadioMessage(13, DEPTRADIO, string);
                        SendClientMessage(playerid, COLOR_WHITE, "You are robbing the bank, the police has been notified!");
                SendClientMessage(playerid, COLOR_WHITE, "You gotta stay inside the bank to get the money");
                     }
            } else {
                SendClientMessage(playerid, COLOR_WHITE, "You can't rob the bank right now!");
            }
            return 1;
    }

    //Functions
    public robtimer(playerid)
    {
            new string[128];//We are defining a new string for the formatted message that we are displaying later on.
        new cash = random(400000);
            GivePlayerMoney(playerid, cash);
            /*
        With the fuction above 'new cash = random(200000);
            GivePlayerMoney(playerid, cash);' we give the player
        a random amount of money from $0 - $200,000
        */
        //Here below we use the string we defined above to format the message itself and display it to the player.
            format(string, sizeof(string), "You have successfully robbed $%d from the bank!", cash);
            SendClientMessage(playerid, COLOR_WHITE, string);
    }

    public waittimer()
    {
            robpossible = 1; //With this we make the bank available for robbery again, and we display a friendly message to all players.
            SendClientMessageToAll(COLOR_WHITE, "The bank is now available for robbery!");
    }
Were i got it from :

Код:
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
				    format(string, sizeof(string), " County General Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
				    SendRadioMessage(1, DEPTRADIO, string);
					SendRadioMessage(2, DEPTRADIO, string);
					SendRadioMessage(3, DEPTRADIO, string);
					SendRadioMessage(5, DEPTRADIO, string);
					SendRadioMessage(7, DEPTRADIO, string);
					SendRadioMessage(11, DEPTRADIO, string);
					SendRadioMessage(13, DEPTRADIO, string);
Errors :

Код:
:\Users\Jackie\Desktop\BankRob.pwn(52) : error 017: undefined symbol "SendClientMessageEx"
C:\Users\Jackie\Desktop\BankRob.pwn(53) : warning 217: loose indentation
C:\Users\Jackie\Desktop\BankRob.pwn(53) : error 017: undefined symbol "string"
C:\Users\Jackie\Desktop\BankRob.pwn(53) : error 017: undefined symbol "string"
C:\Users\Jackie\Desktop\BankRob.pwn(54) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(55) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(56) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(57) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(58) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(59) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(60) : error 017: undefined symbol "SendRadioMessage"
C:\Users\Zin\Desktop\BankRob.pwn(61) : warning 217: loose indentation
C:\Users\Zin\Desktop\BankRob.pwn(62) : warning 217: loose indentation
C:\Users\Zin\Desktop\BankRob.pwn(74) : warning 217: loose indentation
C:\Users\Zin\Desktop\BankRob.pwn(75) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Errors.
Reply
#2

Rename the SendClientMessageEx to SendClientMessage.

Make a function called SendRadioMessage, which will notify the LEO with SendClientMessage.
Reply
#3

How do i make functions?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)