04.11.2016, 17:18
Try with:
Your command should be:
Font: arakuta
https://sampforum.blast.hk/showthread.php?tid=435457
PHP код:
new GunName[47][20] =
{
"Fist","Brass Knuckles","Golf Club","Nightstick","Knife","Basebal Bat","Shovel","Pool Cue","Katana","Chainsaw","Double-ended Dildo","Dildo","Vibrator",
"Silver Vibrator","Flowers","Cane","Grenade","Tear Gas","Molotv Cocktail","?","?","?","9mm","Silenced 9mm","Desert Eagle","Shotgun","Sawnoff-Shotgun",
"Combat Shotgun","Micro-SMG","MP5","Ak-47","M4","Tec9","Country Rifle","Sniper Rifle","RPG","HS-RPG","Flame-Thrower","Minigun","Satchel Charge","Detonator",
"Spray Can","Fire Extinguisher","Camera","Night Goggles","Thermal Goggles","Parachute"
};
// Example of use:
CMD:mygun(playerid)
{
new text[48];
format(text,sizeof text,"You've got a nice: {FFFFFF}%s",GunName[GetPlayerWeapon(playerid)]);
SendClientMessage(playerid,0xFFDD22FF,text);
return 1;
}
PHP код:
CMD:giveallweapons(playerid, params[])
{
new weaponid,model[50],ammo;
if(pInfo[playerid][Admin]<4) return SendClientMessage(playerid, RED, "ERROR: You are not authorized to use this command");
if(sscanf(params, "si", model, ammo)) return SendClientMessage(playerid, RED, "ERROR: /giveallweapon [weaponid] [ammo]");
weaponid = GetWeaponNameID(model);
if(weaponid > 47 || weaponid < 1) return SendClientMessage (playerid, RED, "ERROR: Invailed weapon name");
foreach(Player,i)
{
GivePlayerWeapon(i, weaponid, ammo);
PlayerPlaySound(i, 1057,0.0,0.0,0.0);
}
format(str, SOS, "Administrator %s has given all players weapon [%s] with [%i] ammo ", pInfo[playerid][Name], GunName[weaponid], ammo);
SendClientMessageToAll(BLUE, str);
format(str, SOS, "Admin: %s has used command GIVEALLWEAPONS", pInfo[playerid][Name]);
SendCMDAdmin(BLUE, str);
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=435457