Rob system errors
#1

Quote:

CMD:ro(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!BankRobber[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not robbing the bank.");
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/ro)bbery [text]");
if(AntiAdv(playerid, params)) return 1;
format(string, sizeof(string), "** [Bank Robbery] %s: %s", RPN(playerid), params);
SendRobberyMessage(COLOR_LIGHTGREEN, string);
return 1;
}

CMD:robberyhelp(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
SendClientMessage(playerid, COLOR_YELLOW, "BANK ROBBERY: {FFFFFF}/ro /setuprobbery /joinrobbery /acceptrobbery /startrobbery");
return 1;
}

CMDetuprobbery(playerid, params[])
{
new string[128], cops;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(IsACop(playerid) || IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Police and Government can't rob the bank.");
if(BankRobbery) return SendClientMessage(playerid, COLOR_GREY, "A bank robbery is already being setup.");
if(BankRobberyTime)
{
format(string, sizeof(string), "You need to wait %d more hours before robbing the bank again.", BankRobberyTime);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
foreach(Player, i)
{
if(PlayerInfo[i][pFac] == 1 && PlayerInfo[i][pFacDuty]) cops ++;
}
if(cops < 2) return SendClientMessage(playerid, COLOR_GREY, "There aren't enough police officers on duty to start a robbery.");
BankRobbery = 1;
format(BankRobbers[0], MAX_PLAYER_NAME, "%s", RPN(playerid));
BankRobber[playerid] = 1;
BankRobbersCount = 1;
SendClientMessage(playerid, COLOR_LIGHTGREEN, " Other players can join using /joinrobbery, chat with robbers using /ro.");
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawSetString(Textdraw1, BankRobbers[0]);
TextDrawShowForPlayer(playerid, Textdraw1);
return 1;
}

CMD:joinrobbery(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(IsACop(playerid) || IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Police and Government can't rob the bank.");
if(!BankRobbery) return SendClientMessage(playerid, COLOR_GREY, "There's no bank robbery being setup.");
if(BankRobber[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are already robbing the bank.");
if(RobberyRequest[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You have already requested to join the robbery.");
if(RobberyStarted) return SendClientMessage(playerid, COLOR_GREY, "The bank robbery has already started.");
SendClientMessage(playerid, COLOR_LIGHTGREEN, " You have requested to join the robbery, wait for the robbery orgainzer to take an action.");
format(string, sizeof(string), "Bank Robbery: %s [ID %d] has requested to join the bank robbery. (/acceptrobbery)", RPN(playerid), playerid);
SendRobberyMessage(COLOR_LIGHTGREEN, string);
RobberyRequest[playerid] = 1;
return 1;
}


CMD:acceptrobbery(playerid, params[])
{
new string[128], playerb;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!BankRobbery) return SendClientMessage(playerid, COLOR_GREY, "There's no bank robbery being setup.");
if(BankRobber[playerid] != 1) return SendClientMessage(playerid, COLOR_GREY, "You are not the bank robbery leader.");
if(BankRobbersCount >= 5) return SendClientMessage(playerid, COLOR_GREY, "You can't have more than 5 players robbing the bank.");
if(RobberyStarted) return SendClientMessage(playerid, COLOR_GREY, "The bank robbery has already started.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /acceptrobbery [playerid]");
if(!RobberyRequest[playerb]) return SendClientMessage(playerid, COLOR_GREY, "Player hasn't requested to join the robbery.");
RobberyRequest[playerb] = 0;
BankRobbersCount ++;
BankRobber[playerb] = BankRobbersCount;
format(BankRobbers[BankRobbersCount-1], MAX_PLAYER_NAME, "%s", RPN(playerb));
format(string, sizeof(string), "Bank Robbery: %s has accepted %s's request to join the bank robbery.", RPN(playerid), RPN(playerb));
SendRobberyMessage(COLOR_LIGHTGREEN, string);
// Textdraw
if(BankRobbersCount == 2) {TextDrawSetString(Textdraw2, BankRobbers[1]);}
else if(BankRobbersCount == 3) {TextDrawSetString(Textdraw3, BankRobbers[2]);}
else if(BankRobbersCount == 4) {TextDrawSetString(Textdraw4, BankRobbers[3]);}
else if(BankRobbersCount == 5) {TextDrawSetString(Textdraw5, BankRobbers[4]);}
foreach(Player, i)
{
if(BankRobber[i])
{
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
if(BankRobbersCount >= 2) {TextDrawShowForPlayer(i, Textdraw2);}
else if(BankRobbersCount >= 3) {TextDrawShowForPlayer(i, Textdraw3);}
else if(BankRobbersCount >= 4) {TextDrawShowForPlayer(i, Textdraw4);}
else if(BankRobbersCount >= 5) {TextDrawShowForPlayer(i, Textdraw5);}
}
}
return 1;
}

CMDtartrobbery(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!BankRobbery) return SendClientMessage(playerid, COLOR_GREY, "There's no bank robbery being setup.");
if(BankRobber[playerid] != 1) return SendClientMessage(playerid, COLOR_GREY, "You are not the bank robbery leader.");
if(RobberyStarted) return SendClientMessage(playerid, COLOR_GREY, "The bank robbery has already started.");
if(BankRobbersCount < 2) return SendClientMessage(playerid, COLOR_GREY, "There aren't enough robbers to rob the bank.");
if(!IsPlayerInRangeOfPoint(playerid, 3, 2242.1460,1632.3909,961.7531)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the bank vault.");
BankC4 = CreateDynamicObject(1654, 2242.0234,1632.7185,960.8000, 0, 89.325012207031, 3.9700012207031);
RobberyStarted = 1;
SetTimer("BankVaultTimer", 10000, false);
SendRobberyMessage(COLOR_LIGHTRED, "** The bank vault is going to explode in 10 seconds, move away from it **");
SendCopMessage(COLOR_BLUE, "LS Bank: There is a group of people attempting to rob the bank!");
foreach(Player, i)
{
if(PlayerInfo[i][pFac] == 1)
{
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
if(BankRobbersCount >= 2) {TextDrawShowForPlayer(i, Textdraw2);}
else if(BankRobbersCount >= 3) {TextDrawShowForPlayer(i, Textdraw3);}
else if(BankRobbersCount >= 4) {TextDrawShowForPlayer(i, Textdraw4);}
else if(BankRobbersCount >= 5) {TextDrawShowForPlayer(i, Textdraw5);}
}
if(BankRobber[i])
{
ClearDodWantedLevels(i);
AddDodWantedLevel(i, "Bank Robbery");
AddDodWantedLevel(i, "Bank Robbery");
AddDodWantedLevel(i, "Bank Robbery");
AddDodWantedLevel(i, "Bank Robbery");
AddDodWantedLevel(i, "Bank Robbery");
AddDodWantedLevel(i, "Bank Robbery");
TotalRobbers ++;
}
}
BankRobberyTime = 4;
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
foreach(Player, i)
{
if(!BankRobber[i] && GetPlayerInterior(i) == 83 && GetPlayerVirtualWorld(i) == 8473)
{
SetPlayerPos(i, 1462.4095,-1011.1602,26.843;
SetPlayerInterior(i, 0);
SetPlayerVirtualWorld(i, 0);
SendClientMessage(i, COLOR_LIGHTRED, "** The bank is being robbed, you have been thrown out by the robbers. **");
}
}
BankBlock = 1;
return 1;
}

*/

Quote:

E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16395) : error 017: undefined symbol "BankRobbery"
E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16407) : error 017: undefined symbol "BankRobbery"
E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16407) : warning 215: expression has no effect
E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16423) : error 017: undefined symbol "BankRobbery"
E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16439) : error 017: undefined symbol "BankRobbery"
E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16474) : error 017: undefined symbol "BankRobbery"
E:\Documents\Sin City Roleplay\gamemodes\sincityroleplay.pwn(16524) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.

I'm using zgaming GM can some help me with this rob bank system please any one .. or can someone give me a FS of robbank please ...
Reply
#2

Use the search man, see this and this

I hope help you

By, PT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)