Tag mismatch (+Rep) please quickly It's really easy
#1

PHP Code:
    // Anti Weapon Hack
    
for(new i47i++){
    new 
WeaponIDBullets;
    
GetPlayerWeaponData(playerid,i,WeaponID,Bullets);
    if(
WeaponID==&& AW[i][playerid] == false){
    
format(String,sizeof(String),"[GameGuard] {ff7777}%s has been ip banned, reason: Cheat Detected (#Code %i X%i)",GetName(playerid),WeaponID,Bullets);
    
SetPlayerHealth(playerid,100);
    
MSGTA(C_RED,String);
    
TogglePlayerControllable(playerid,0);
    new 
Year2,Month2,Day2,Hour2,Minute2,Second2;
    
gettime(Hour2,Minute2,Second2);
    
getdate(Day2,Month2,Year2);
    
format(String,sizeof(String),"{ff0000}You've banned from the server!\n{FFFFFF}Admin: GameGuard\nReason: Cheat Detected\nTime: %i:%i:%i\nDate: %i/%i/%i",Hour2,Minute2,Second2,Year2,Month2,Day2);
    
DLG(param[0],999,DIALOG_STYLE_MSGBOX,"{ff0000}IP Ban",String,"Close","");
    
GetPlayerIp(playerid,PIP,sizeof(PIP));
    
format(BanipDB[playerid][IPAddress],16,PIP);
    
format(BanipDB[playerid][Admin],MAX_PLAYER_NAME,"GameGuard");
    
format(String,sizeof(String),"Weapon Hack (%s) (Ammo: %s)",GetWepName(WeaponID),Comma(Bullets));
    
format(BanipDB[playerid][Reason],64,String);
    
BanipDB[playerid][Second]=Second2;
    
BanipDB[playerid][Minute]=Minute2;
    
BanipDB[playerid][Hour]=Hour2;
    
BanipDB[playerid][Day]=Day2;
    
BanipDB[playerid][Month]=Month2;
    
BanipDB[playerid][Year]=Year2;
    
SaveBanipFile(playerid);
    
GameTextForPlayer(playerid"~R~Banned"999990);
    
KickPlayer(playerid);}} 
line of the tag mismatch:
PHP Code:
if(WeaponID==&& AW[i][playerid] == false){ 
Reply
#2

Code:
if(WeaponID==i && AW[playerid][i] == false){
Reply
#3

Is "AW[i][playerid]" a boolean? And does it have the same dimensions as when it was declared?

pawn Code:
new bool:AW[48][MAX_PLAYERS] = false;
Reply
#4

Code:
if(WeaponID==i && AW[i] == false){
Reply
#5

Quote:
Originally Posted by SickAttack
View Post
Is "AW[i][playerid]" a boolean? And does it have the same dimensions as when it was declared?

pawn Code:
new bool:AW[48][MAX_PLAYERS] = false;
omg lol ty im so stupid i forgot to define it as boolean. thanks mate you gained your rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)