[FilterScript] Basic Robbery System
#1

Basic Robbery System

Features
-1 Bank Robbery in Fort Carson
-1 24/7 Store Robbery In Fort Carson
-Random Amount of money , depending on the store/bank
-Wanted Level upon Robbery
-Dynamic Checkpoints


Its pretty simple as you can only rob 2 places , a store and a bank . Its for begginers and if you like it , you can add more places .


How to add another location:

Go outside the store/bank you want to make a robbery , and type /save Place Outside CP
After that Click here and find the interior id and the inside pos of the place you want.
After that add on the script:

pawn Код:
new CP_MyCP; // Rename MyCP with the name you want
new CP_InMyCP // ^^
new IsInsideMyCP; // ^^

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == CP_MyCP)
    {
    SetPlayerPos(playerid,X,Y,Z); // The Place Pos .
    SetPlayerInterior(playerid, 0); // The interior of the place
    IsInsideMyCP[playerid] = 1; //We set this to 1 so later on we can check if the player is inside the place so he cant use the /robmyplace cmd outside it . (To prevent an abuse)
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"Welcome to the bank.Type /robbank to rob the bank");
    }
    if(checkpointid == CP_InMyCP)
    {
    SetPlayerPos(playerid,X,Y,Z); // A pos near the place(+2-3 meters from the checkpoint so the player wont enter the checkpoint upon spawn
    IsInsideBank[playerid] = 0; // We set this to 0 so he wont by able to rob it again while he's outside
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"You have left the bank");
    }
return 1;
}
CMD:robmyplace(playerid,params[])
{
//COPS /ARMY /CIA shouldn't be allowed to commit crimes like a heist .
// Undefine the line below and change TEAM_COP to your team variable
//  if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid,COLOR_RED,"{00FFFF}[SERVER]{EEEEEE}Law Enforcement Officers cannot commit a robbery crime");
    new pName[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid,pName,sizeof(pName));
    if(GetPlayerWantedLevel(playerid >=1)) return SendClientMessage(playerid,COLOR_RED,"{00FFFF}[SERVER]{EEEEEE}You cant rob myplace with a wanted level.");
    if(IsInside247[playerid] == 1)
    {
    new StoreMoney = RandomEx( 10000,30000); // the amount of money
    format(string,sizeof(string),"{FF0000}[ROBBERY]{EEEEEE}%s has robbed MyPlace  of San Andreas and got %d$",pName,StoreMoney); // Change my place with the place name and San Andreas with the name of the local city of my place
    SendClientMessageToAll(COLOR_LIGHTGREEN,string);
    GameTextForPlayer(playerid,"~y~24/7Store~n~~r~ROBBED",3000,5);
    format(string,sizeof(string),"{FF0000}[ROBBERY]{EEEEEE}You've successfully robbed the MyPlace and got $%d",pName,StoreMoney); // Change my place with the place name
    SendClientMessage(playerid,COLOR_LIGHTGREEN,string);
    SendClientMessage(playerid,COLOR_RED,"{00FFFF}[SERVER]{EEEEEE}You have gained 3 stars for robbing the 24/7 store");
    GivePlayerMoney(playerid,StoreMoney);
    SetPlayerWantedLevel(playerid,3);
    }
    else SendClientMessage(playerid,COLOR_RED,"{00FFFF}[SERVER]{EEEEEE}You need to be inside the 247/7 store");
    return 1;
}
And like that you can add more places.
In the fs.rar you will find all the needed includes and plugins.

Credits:
Me - Scripting
Konstantinos - Helped me abit
****** - sscanf
Zeex - ZCMD
Incognito - Streamer


Download
Reply
#2

Umm good, useful for newbies.
Reply
#3

Quote:
Originally Posted by iFiras
Посмотреть сообщение
Umm good, useful for newbies.
Thanks . I might add a timer for v2 so they players wont be able to re-enter the store/bank and re-do the robbery .
Thanks for the support .
Anyone else?
Reply
#4

Nice!
Reply
#5

Good !
Reply
#6

Good job
Reply
#7

gOOD jOB bRO vERY gOOD gAMEMODE !!
1+ rEP pLEASE rEP mE bACK
Reply
#8

Good Job
Reply
#9

i will try to use this.
Reply
#10

Thanks for your support.
As i said its a BASIC Robbery System.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)