#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:disarm(playerid, params[])
{
new pid,
Float:x,
Float:y,
Float:z,
str[128],
name[MAX_PLAYER_NAME];
if(sscanf(params, \"u\", pid)) return SendClientMessage(playerid, -1, \"Használat: /disarm [Játékos ID/Név]\");
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, -1, \"Nem aktív játékos!\");
GetPlayerPos(pid, x,y,z);
if(!IsPlayerInRangeOfPoint(playerid, 3.0, x,y,z)) return SendClientMessage(playerid, -1, \"A játékos nincs a közeledben!\");
ResetPlayerWeapons(pid);
GetPlayerName(pid, name, MAX_PLAYER_NAME);
format(str, 128, \"Sikeresen elvetted %s fegyvereit!\", name);
SendClientMessage(playerid, -1, str);
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(str, 128, \"%s elvette a fegyvereid!\", name);
SendClientMessage(playerid, -1, str);
return 1;
}
Nem teszteltem, de jónak kell lennie.