sorry off topic
how to add this code
COMMAND:agiveweapon(playerid, params[])
{
if(!logged[playerid])
return SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in!");
if(PlayerInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not allowed to use that command!");
new
targetid = INVALID_PLAYER_ID,
weaponid,
ammo;
if(sscanf(params, "uii", targetid, weaponid ammo))
return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /agiveweapon [id] [arme] [munitions]");
if(!IsPlayerConnected(targetid))
{
format(string, sizeof(string), "ID:%d is not an active player.", targetid);
SendClientMessage(playerid, COLOR_BRIGHTRED, string);
return 1;
}
new
targetName[MAX_PLAYER_NAME],
weaponName[32];
GetPlayerName(targetid, targetName, sizeof targetName);
GetWeaponName(weaponid, weaponName, sizeof weaponName);
GivePlayerWeapon(targetid, weaponid, ammo);
format(string, sizeof(string), "You have given %s a %d with %d ammo.", targetName, weaponName, ammo);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
i compile it and i get error like this
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : error 017: undefined symbol "logged"
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : warning 215: expression has no effect
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : error 001: expected token: ";", but found "]"
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : error 029: invalid expression, assumed zero
C:\Users\Cyber\Desktop\SSSS\GL.pwn(1857) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
or how to short this code to zcmd code