SA-MP Forums Archive
Tag mismatch (+Rep) please quickly It's really easy - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatch (+Rep) please quickly It's really easy (/showthread.php?tid=583063)



Tag mismatch (+Rep) please quickly It's really easy - Lirbo - 25.07.2015

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){ 



Re: Tag mismatch (+Rep) please quickly It's really easy - gurmani11 - 25.07.2015

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



Re: Tag mismatch (+Rep) please quickly It's really easy - SickAttack - 25.07.2015

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;



Re: Tag mismatch (+Rep) please quickly It's really easy - Fancy - 25.07.2015

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



Re: Tag mismatch (+Rep) please quickly It's really easy - Lirbo - 25.07.2015

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