|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Location: Philippines
Posts: 169
Reputation: 13
|
How to make a bank robbery system for my RP server? Any Hints?
|
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2011
Location: Sublime Text 2
Posts: 2,008
Reputation: 326
|
Your question is way too general. Have you even tried giving this a shot yourself? If you get stuck, then post here.
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2011
Location: Sublime Text 2
Posts: 2,008
Reputation: 326
|
|
|
|
|
|
|
#4 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Location: Philippines
Posts: 169
Reputation: 13
|
I already make a bank robbery system but i want to convert it to zcmd
Code:
if(strcmp(cmd, "/robbank", true) == 0)
{
if(PlayerInfo[playerid][pLevel] < 4)
{
SendClientMessage(playerid, COLOR_GREY, " You must be a level 4 or higher to be able to rob the bank.");
return 1;
}
if(IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Law Enforcement Officials cannot rob the bank.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1448.44, -988.52, 1639.78))
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the bank safe.");
return 1;
}
if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)
{
new bjt;
bjt = TIME_BETWEEN_BANKJOBS - TimeAfterBankJob;
format(string, sizeof(string), " You must wait %d hours before making the next bank robbery attempt.", bjt);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
if(BankJobPlayer < 999 && BankJobPlayer != playerid)
{
SendClientMessage(playerid, COLOR_GREY, " Someone is already robbing the bank.");
return 1;
}
if(BankJobPlayer == playerid)
{
format(string, 256, " You're already robbing the bank! %d minutes left.", BankJobTime / 2);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
new Cops = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsACop(i))
{
Cops += 1;
}
}
if(!(Cops >= 3))
{
SendClientMessage(playerid,COLOR_GREY," There must be at least 3 Law Enforcement Officials online.");
return 1;
}
format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME/2);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[playerid][pWantedLevel] <= 1)
{
PlayerInfo[playerid][pWantedLevel] += 5;
}
else if(PlayerInfo[playerid][pWantedLevel] >= 2)
{
PlayerInfo[playerid][pWantedLevel] = 6;
}
SetPlayerCriminal(playerid, 999, "Bank Robbery");
format(string, 256, "City Alert: The Los Santos Bank is being robbed!");
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
BankJobTime = BANK_JOB_TIME;
BankJobPlayer = playerid;
return 1;
}
|
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2011
Location: Sublime Text 2
Posts: 2,008
Reputation: 326
|
I highly doubt you made this. This is obviously straight from the godfather roleplay or something.
|
|
|
|
|
|
#6 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Location: Philippines
Posts: 169
Reputation: 13
|
yup its from GF. how do i convert it?
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2012
Location: Mi, USA
Posts: 937
Reputation: 143
|
lol you have released a filter script that uses ZCMD but you cant convert this code?
forgive me if i missed something here. |
|
|
|
|
|
#8 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Location: Philippines
Posts: 169
Reputation: 13
|
|
|
|
|
|
|
#9 |
|
Big Clucker
![]() ![]() Join Date: Dec 2011
Location: Philippines
Posts: 169
Reputation: 13
|
Is this correct ?
Code:
CMD:robbank(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] < 4)
{
SendClientMessage(playerid, COLOR_GREY, " You must be a level 4 or higher to be able to rob the bank.");
return 1;
}
if(IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Law Enforcement Officials cannot rob the bank.");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1448.44, -988.52, 1639.78))
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the bank safe.");
return 1;
}
if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)
{
new bjt;
bjt = TIME_BETWEEN_BANKJOBS - TimeAfterBankJob;
format(string, sizeof(string), " You must wait %d hours before making the next bank robbery attempt.", bjt);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
if(BankJobPlayer < 999 && BankJobPlayer != playerid)
{
SendClientMessage(playerid, COLOR_GREY, " Someone is already robbing the bank.");
return 1;
}
if(BankJobPlayer == playerid)
{
format(string, 256, " You're already robbing the bank! %d minutes left.", BankJobTime / 2);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
new Cops = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsACop(i))
{
Cops += 1;
}
}
if(!(Cops >= 3))
{
SendClientMessage(playerid,COLOR_GREY," There must be at least 3 Law Enforcement Officials online.");
return 1;
}
format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME/2);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[playerid][pWantedLevel] <= 1)
{
PlayerInfo[playerid][pWantedLevel] += 5;
}
else if(PlayerInfo[playerid][pWantedLevel] >= 2)
{
PlayerInfo[playerid][pWantedLevel] = 6;
}
SetPlayerCriminal(playerid, 999, "Bank Robbery");
format(string, 256, "City Alert: The Los Santos Bank is being robbed!");
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
BankJobTime = BANK_JOB_TIME;
BankJobPlayer = playerid;
return 1;
}
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FilterScript] How To make Filter and Script files make | Morkano | Filterscripts | 10 | 24/01/2012 03:03 PM |
| how can i make a command to make building's in game | wes231 | Scripting Help | 1 | 17/11/2011 07:52 AM |
| How to make a menu and how to make it have teleport options | zanakinz | Help Archive | 9 | 05/04/2011 12:55 AM |
| Make a door and make to move the gate | whitedragon | Help Archive | 18 | 27/11/2009 09:39 PM |
| [HELP]Can someone make a Tutorial for how to make 0.3 propertys? | Lilcuete | Help Archive | 2 | 10/11/2009 08:45 PM |