pawn Код:
new wNamesShortened[][32] = {
{"Unarmed (Fist)"}, // 0
{"Brass Knuckles"}, // 1
{"Golf Club"}, // 2
{"Night Stick"}, // 3
{"Kn."}, // 4
{"Baseball Bat"}, // 5
{"Shovel"}, // 6
{"Pool Cue"}, // 7
{"Katana"}, // 8
{"Chainsaw"}, // 9
{"Purple Dildo"}, // 10
{"Big White Vibrator"}, // 11
{"Medium White Vibrator"}, // 12
{"Small White Vibrator"}, // 13
{"Flowers"}, // 14
{"Cane"}, // 15
{"Grenade"}, // 16
{"Teargas"}, // 17
{"Molotov"}, // 18
{" "}, // 19
{" "}, // 20
{" "}, // 21
{"Colt 45"}, // 22
{"Silenced"}, // 23
{"Deagle"}, // 24
{"Shotgun"}, // 25
{"Sawnoff"}, // 26
{"Combat"}, // 27
{"Uzi"}, // 28
{"MP5"}, // 29
{"AK47"}, // 30
{"M4"}, // 31
{"Tec9"}, // 32
{"Rifle"}, // 33
{"Sniper"}, // 34
{"RPG"}, // 35
{"HS RPG"}, // 36
{"Flamethrower"}, // 37
{"Minigun"}, // 38
{"Satchel Charge"}, // 39
{"Detonator"}, // 40
{"Spray Can"}, // 41
{"Fire Extinguisher"}, // 42
{"Camera"}, // 43
{"NVG"}, // 44
{"IVG"}, // 45
{"Para."}, // 46
{"Fake Pistol"} // 47
};
stock ReturnPlayerWeaponsString(playerid)
{
new string[128];
new WeaponID, Ammo;
for(new i = 0; i < 13; i++)
{
if(i == 0 || i == 1)
{
GetPlayerWeaponData(playerid,i,WeaponID,Ammo);
if(Ammo > 1)
{
Ammo = 1;
}
}
else
{
GetPlayerWeaponData(playerid,i,WeaponID,Ammo);
}
if(WeaponID > 0 && Ammo > 0)
{
if(Ammo > 60000) //melee weaps
Ammo = 1;
if(strlen(string) > 4)
format(string,128,"%s %s(%d),", string, wNamesShortened[WeaponID], Ammo);
else
format(string,128,"%s(%d),", wNamesShortened[WeaponID], Ammo);//First Weapon
}
}
if(strlen(string) < 3)
{
string = "N/A";
}
return string;
}
zcmd(check, playerid, params[])
{
new checkid;
if (!sscanf(params, "u", checkid))
{
if(!IsPlayerConnected(checkid)) return SendClientMessage(playerid, 0xAFAFAFAA, "* That player is not connected.");
if(checkid == playerid) return SendClientMessage(playerid, 0xAFAFAFAA, "* You cannot check yourself yourself");
new SM_PNstring [128], playername[MAX_PLAYER_NAME];
GetPlayerName(checkid,playername,sizeof(playername));
format(SM_PNstring, sizeof(SM_PNstring), "*** %s 's Weapons in Hand: %s", playername, ReturnPlayerWeaponsString(checkid));
SendClientMessage(playerid, 0xFF8000FF, SM_PNstring);
}
else SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /check [playerid/PartofName]");
return 1;
}
Good Luck. Untested.