Quote:
Originally Posted by BulletRaja
PHP код:
CMD:w(playerid, params[])
{
new weapid, ammo;
if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GRAY, "You are not authorized to use that command!");
if (sscanf(params, "di", weapid, ammo)) return SendClientMessage(playerid, COLOR_GRAY, "Usage: /w [weapon id] [ammo]");
if (weapid < 0 || weapid > 46) return SendClientMessage(playerid, COLOR_GRAY, "Invalid weapon ID!");
else
{
GivePlayerWeapon(playerid, weapid, ammo);
}
return 1;
}
|
1- Don't just send code, explain it.
2- That code will never work.