23.07.2012, 23:10
I know it's kinda embarrassing for me to ask for help in this area.
I can't seem to find my error' :
Coding, for the CMD:robbank
Is suppose to send a admin warning for the Head Administrator to approve for the player to /robbank. Yet I can only get it to send a admin warning.
Note : When working with NGG I wasn't inside this kind of department I was inside a different area. So this kind of stuff isn't my thing.
I can't seem to find my error' :
Код:
C:\Users\Akira\Desktop\[Server]\gamemodes\MSRP2.pwn(55952) : error 035: argument type mismatch (argument 3) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Код:
CMD:robbank(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, COLOR_GREY, "You must be a level 3 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, 2388.4727, -1596.8754, 785.6183))
{
SendClientMessage(playerid, COLOR_GREY, "You are not at the bank safe.");
return 1;
}
if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)
{
new bjt;
new string[128];
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)
{
new string[128];
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 >= 0))
{
SendClientMessage(playerid,COLOR_GREY," There must be at least 6 Law Enforcement Officials online.");
return 1;
}
new string[128];
new giveplayerid;
format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME);
ABroadCast( COLOR_YELLOW, "{AA3333}AdmWarning{FFFF00}: %s has possibly started robbing the bank without permission.", GetPlayerNameEx(playerid) );
ABroadCast( COLOR_YELLOW, string, 4 );
SetPlayerColor(playerid, COLOR_TWRED);
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[MAX_PLAYERS][pWantedLevel] <= 1)
{
WantedPoints[giveplayerid] += 6;
}
else if(PlayerInfo[MAX_PLAYERS][pWantedLevel] >= 2)
{
WantedPoints[giveplayerid] += 6;
}
SetPlayerCriminal(playerid, 999, "Bank Robbery");
format(string, 256, "City Alert: The Bank Is Being Robbed!");
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
BankJobTime = BANK_JOB_TIME;
BankJobPlayer = playerid;
return 1;
})
Is suppose to send a admin warning for the Head Administrator to approve for the player to /robbank. Yet I can only get it to send a admin warning.
Note : When working with NGG I wasn't inside this kind of department I was inside a different area. So this kind of stuff isn't my thing.


