23.12.2013, 05:14
pawn Код:
CMD:giveallgun(playerid, params[])
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(pInfo[playerid][pAdminLevel] >= 4)
{
new weapid, ammo;
if(sscanf(params,"dd", weapid, ammo)) return SendClientMessage(playerid, red,"[USAGE]: /giveallweapon [weapon] [ammo]");
if(IsValidWeapon(weapid))
{
if(IsPlayerConnected(i))
{
GivePlayerWeapon(i, weapid, ammo);
new str[150];
format(str, sizeof(str),"Administrator %s has given everyone %d ammo of weapon %d", PlayerName(playerid), ammo, weapid);
SendClientMessage(i, orange, str);
}
}
else return SendClientMessage(playerid, red,"[ADMIN]: You are not allowed to give this weapon!");
}
else return SendClientMessage(playerid, red,"[ADMIN]: You are not high enough level to use this command!");
}
return 1;
}