Symbol is never used
#1

error:
Код:
C:\Users\Carlos\Desktop\Death Match Scripts\plugins\Admin.pwn(645) : error 017: undefined symbol "weapon"
C:\Users\Carlos\Desktop\Death Match Scripts\plugins\Admin.pwn(645) : error 017: undefined symbol "id"
C:\Users\Carlos\Desktop\Death Match Scripts\plugins\Admin.pwn(645) : error 029: invalid expression, assumed zero
C:\Users\Carlos\Desktop\Death Match Scripts\plugins\Admin.pwn(645) : fatal error 107: too many error messages on one line
code:

Код:
public OnPlayerUpdate(playerid)
{
            new weaponid = GetPlayerWeapon(playerid);//This will cause the "weaponid not defined" Error
            new Nam[MAX_PLAYER_NAME];
            new str[128];
            if( weaponid == 16 || weaponid == 17 || weaponid == 18 || weaponid == 19 || weaponid == 20 || weaponid == 21 || weaponid == 34 || weaponid == 35 || weaponid == 36 || weaponid == 37 || weaponid == 38 || weaponid == 39 || weaponid == 40 || weapon id == 26 || weaponid == 27) /* etc etc */)  // The weapon ID
            {
				GetPlayerName(playerid,Nam,sizeof(Nam));
                format(str,sizeof(str),"[ANTI-CHEAT]: Player %s has been banned from server by: ANTI-CHEAT[Weapon Hack]",Nam);
                if(gPlayerInfo[playerid][PLAYER_LEVEL] >= 1)
				SendClientMessage(0xFF0000FF,str);

            }
			else
			{
            BanEx(playerid,"[ANTI-CHEAT]: You have been banned by realistika deathmatch Anti-Cheat [Permanently]");
            }
            return 1;
}
error line:

Код:
if( weaponid == 16 || weaponid == 17 || weaponid == 18 || weaponid == 19 || weaponid == 20 || weaponid == 21 || weaponid == 34 || weaponid == 35 || weaponid == 36 || weaponid == 37 || weaponid == 38 || weaponid == 39 || weaponid == 40 || weapon id == 26 || weaponid == 27) /* etc etc */)  // The weapon ID
Reply
#2

PHP код:
if(GetPlayerWeapon(playerid) >= && GetPlayerWeapon(playerid) <= 45
Just modify the numbers.
Reply
#3

Quote:
Originally Posted by Bogdan1992
Посмотреть сообщение
PHP код:
if(GetPlayerWeapon(playerid) >= && GetPlayerWeapon(playerid) <= 45
Just modify the numbers.
You realise that this will ban a player having any weapon?

pawn Код:
public OnPlayerUpdate(playerid)
{
            new Nam[MAX_PLAYER_NAME];
            new str[128];
            if( GetPlayerWeapon(playerid) == 16 || GetPlayerWeapon(playerid) == 17 || GetPlayerWeapon(playerid) == 18 || GetPlayerWeapon(playerid) == 19 || GetPlayerWeapon(playerid) == 20 || GetPlayerWeapon(playerid) == 21 || GetPlayerWeapon(playerid)  == 34 || GetPlayerWeapon(playerid) == 35 || GetPlayerWeapon(playerid) == 36 || GetPlayerWeapon(playerid) == 37 || GetPlayerWeapon(playerid) == 38 || GetPlayerWeapon(playerid) == 39 || GetPlayerWeapon(playerid) == 40 || GetPlayerWeapon(playerid) id == 26 ||GetPlayerWeapon(playerid) == 27)
            {
                GetPlayerName(playerid,Nam,sizeof(Nam));
                format(str,sizeof(str),"[ANTI-CHEAT]: Player %s has been banned from server by: ANTI-CHEAT[Weapon Hack]",Nam);
                if(gPlayerInfo[playerid][PLAYER_LEVEL] >= 1)
                SendClientMessage(0xFF0000FF,str);
            }
            else
            {
            BanEx(playerid,"[ANTI-CHEAT]: You have been banned by realistika deathmatch Anti-Cheat [Permanently]");
            }
            return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)