06.04.2017, 20:20
Hi Guys
i have small problems my Code no effect in my Server
i tired to Type 1 in chat after that's i Type Amount Ammo i needed not working why ?
i have small problems my Code no effect in my Server
PHP код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '1')
{
if(FirstWeaponText[playerid] == 1)
{
new Amount;
if( sscanf ( text[1], "i",Amount)) return SendClientMessage(playerid,-1, "[amount]");// amount he wants.
if(Amount < 1 || Amount > 10000) return SendClientMessage(playerid,-1,"You can only buy from 1 - 10000 bullets");// check if player has writen more than required
{
GivePlayerMoney(playerid,-Amount*100); // this makes 1 bullet for 100$
GivePlayerWeapon(playerid, WEAPON_M4, Amount);
}
}
}