Reload all weapons
#9

Sorry for bumb!
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..
Reply


Messages In This Thread
Reload all weapons - by davve95 - 16.10.2013, 18:06
Re: Reload all weapons - by -=Dar[K]Lord=- - 16.10.2013, 18:09
Re: Reload all weapons - by davve95 - 17.10.2013, 13:46
Re: Reload all weapons - by Konstantinos - 17.10.2013, 13:50
Re: Reload all weapons - by davve95 - 17.10.2013, 16:29
Re: Reload all weapons - by Konstantinos - 17.10.2013, 16:40
Re: Reload all weapons - by [LCK]Chris - 17.10.2013, 16:41
Re: Reload all weapons - by davve95 - 17.10.2013, 19:20
Re: Reload all weapons - by davve95 - 07.12.2013, 20:31
Re: Reload all weapons - by Emmet_ - 07.12.2013, 20:36

Forum Jump:


Users browsing this thread: 1 Guest(s)