23.11.2011, 16:49
Is it possible to use this in one line:
Is this even possible? Or not?
Since script is not working.
It compiles succesfull with no errors.
But (its a anti hack script) the command isn't working, it automatically resets the weapons even if the "&&" is included about APlayerData.
Script now:
Our /agodon command:
The command itself doesn't really matters to it.
Anyone knows how I could fix this?
pawn Код:
if ((APlayerData[playerid][PlayerLevel] == 5) && (PoliceGetsWeapons == true) && (APlayerData[playerid][PlayerClass] == ClassPolice))
Since script is not working.
It compiles succesfull with no errors.
But (its a anti hack script) the command isn't working, it automatically resets the weapons even if the "&&" is included about APlayerData.
Script now:
pawn Код:
if ((APlayerData[playerid][PlayerLevel] == 5) && (PoliceGetsWeapons == true) && (APlayerData[playerid][PlayerClass] == ClassPolice))
{
// Do nothing
}
else
ResetPlayerWeapons(playerid);
pawn Код:
COMMAND:agodon(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 3)
{
GivePlayerWeapon(playerid,38,999999);
SetPlayerHealth(playerid,999999);
SetPlayerArmour(playerid,999999);
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}GOD Mode on.");
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}You are not an admin!");
return 1;
}
Anyone knows how I could fix this?