SA-MP Forums Archive
some dcmd help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: some dcmd help (/showthread.php?tid=202267)



some dcmd help - eDz0r - 23.12.2010

comand not work

if say me invalid id or wrong usage but it not give me the weheapon

pawn Код:
dcmd_giveweapon(playerid, params[])
{
new id, weapon, ammo;
if (strlen(params))
{
id = strval(params); weapon = strval(params); ammo = strval(params);
if (IsPlayerConnected(id))
{
GivePlayerWeapon(id, weapon, ammo);
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Player Not Found");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Usage: /giveweapon [playerid] [weaponid] [ammo]");
}
return 1;
}