07.12.2013, 20:31 
	
	
	
		Sorry for bumb!
Long time ago I scripted..
And I noticed the bug...
Anyway:
When I have refilled the weapons it says "Unknown command"
Edit: And how can I make so it refills ammo on all weapons??..
And just use it like 4 times, then you don't have it anymore..
	
	
	
Long time ago I scripted..
And I noticed the bug...
Anyway:
When I have refilled the weapons it says "Unknown command"
pawn Код:
if (strcmp("/ab", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, Green, "Ammo box!");
Ammobox2[playerid]=1;
SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)+500);
SendClientMessage(playerid, Green, "You successfully refilled ammo on your weapons!");
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buyammobox", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 301.8950,-80.8986,1001.5156))
if(GetPlayerMoney(playerid) < 2000)
{
SendClientMessage(playerid, Red, "You don't have enough money!");
}
else
{
Ammobox2[playerid]=1;
GivePlayerMoney(playerid, -2000);
SendClientMessage(playerid, Green, "You recently bought a ammo box!, use /ab to refill your ammo anywhere!");
}
return 1;
}
Edit: And how can I make so it refills ammo on all weapons??..
And just use it like 4 times, then you don't have it anymore..


