23.07.2011, 05:12
Quote:
It does nothing right at the start, if I'm lower then Level 2 it doesn't send me the return message for that.
|
Anyway, I'm pretty sure it'll do something if it's called, so lets add some prints to debug it like I stated earlier, I'll help you add them:
pawn Код:
dcmd_robbank(playerid, params[])
{
print("Success 1");
if(PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, -1, "You need to be at least Level 3!");
print("Success 2");
if(!IsPlayerInRangeOfPoint(playerid, 2, 345.585968, 112.513107, 1008.184448) return SendClientMessage(playerid, -1, "You're not at the Robbing Point!");
print("Success 3");
if(IsACop(playerid)) return SendClientMessage(playerid, -1, "Cops cannot rob the bank!");
new Cops = 0;
print("Success 4");
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsACop(i)) Cops += 1;
print("Success 5");
if(!(Cops >= 2))
{
print("Success 6");
SendClientMessage(playerid,COLOR_GREY,"There must be at least 2 Law Enforcement Officials online.");
return 1;
}
print("Success 7");
//new sendername[MAX_PLAYER_NAME]; - Pointless? Never used in this snippet!
//GetPlayerName(playerid, sendername, sizeof(sendername)); - Pointless? Never used in this snippet!
SendClientMessageToAll(COLOR_LIGHTBLUE, "The Los Santos City bank is being robbed!");
return 1;
}
