#include <a_samp>#include <zcmd>#include <sscanf>#define PIROS 0xAA3333AA#define SARGA 0xFFFF00AACMD:giveweapon(playerid,params[]){if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,5,\"Nem vagy RCON ADMIN !\");new target,weaponid,tolteny,str[200];if(sscanf(params,\"ddd\",target,weaponid,tolteny)) return SendClientMessage(playerid,SARGA,\"Használat : /giveweapon [iD] [Fegyverid][Tolteny]\");if(weaponid < 1 || weaponid > 46) return SendClientMessage(playerid,PIROS,\"Csak 1-46 közt lehetnek a fegyverek!\");format(str,sizeof(str),\"Fegyvert adtál neki :%s , Fegyver ID:%d, Töltény:%d\",pName(playerid),weaponid,tolteny);SendClientMessage(playerid,SARGA,str);format(str,sizeof(str),\"Fegyvert kaptál tõle :%s\",pName(playerid));SendClientMessage(target,SARGA,str);GivePlayerWeapon(target,weaponid,tolteny);return 1;}stock pName( playerid ){new s_szPlayerName[ MAX_PLAYER_NAME ];GetPlayerName( playerid, s_szPlayerName, MAX_PLAYER_NAME );return s_szPlayerName;}
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,5,\"Nem vagy RCON ADMIN !\");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,5,\"Nem vagy RCON ADMIN !\");
Ebben vannak a hibák: if(sscanf(params,\"udd\",pid,wid,amt)) return SendClientMessage(playerid,0xff0000FF,\"ERROR: Használat / if(wid < 0 || wid >40) return SendClientMessage(playerid,0xff0000FF,\"ERROR: Rossz fegyver ID\");
if(sscanf(params,\"udd\",pid,wid,amt)) return SendClientMessage(playerid,0xff0000FF,\"ERROR: Használat / if(wid < 0 || wid >40) return SendClientMessage(playerid,0xff0000FF,\"ERROR: Rossz fegyver ID\");
if(sscanf(params,\"udd\",pid,wid,amt)) return SendClientMessage(playerid,0xff0000FF,\"Használat: /giveweapon (PlayerID / Név) (Fegyver ID) (Töltény));