03.10.2015, 20:53
Why don't you use getplayerhealth?
PHP код:
CMD:weapons(playerid)
{
//{250,300,1500,1000,1200,1300,1500,2000,2100,500,500,2100,2400,500,3000}
new Float:heal;
GetPlayerHealth (playerid, heal);
if (heal>0.5)
{
ShowPlayerDialog(playerid,D_WEAPONS,DIALOG_STYLE_TABLIST_HEADERS,"{45ff88}Buy a Weapon",
"Weapon\tPrice\tAmmo\n\
Brass Knuckles\t250\t1\n\
Knife\t300\t1\n\
Grenade\t1500\t15\n\
Molotov Cocktail\t1000\t20\n\
9mm\t1200\t700\n\
Silenced 9mm\t1300\t700\n\
Desert Eagle\t1500\t450\n\
Sawn-Off Shotgun\t2000\t200\n\
Combat Shotgun\t2100\t350\n\
Micro SMG(Uzi)\t500\t2000\n\
MP5\t500\t2000\n\
AK-47\t2100\t1500\n\
M4\t2400\t1700\n\
Tec9\t500\t2000\n\
Sniper Rifle\t3000\t345\n",
"Buy","Back");
}
else SendClientMessage(playerid,0xff5678,"You have not spawned yet");
return 1;
}