Help for script
#1

Hello everyone! hope everything's fine.
I wanted to ask how can i stop the player from buying weapons when in godmode.
my script for godmode is


Код:
#include <a_samp>
#include <zcmd>

#define red              0xFF0000AA
#define green            0x33FF33AA

new GodMode[MAX_PLAYERS];
new Float:hp[MAX_PLAYERS];
new Float:armour[MAX_PLAYERS];

CMD:godmodeon(playerid, params[])
{
    
        if(GodMode[playerid] == 0)
        {
			ResetPlayerWeapons(playerid);
            GodMode[playerid] = 1;
            SetPlayerHealth(playerid, 99999);
            SetPlayerArmour(playerid, 99999);
                        SetVehicleHealth(GetPlayerVehicleID(playerid),9999999999);
            GetPlayerHealth(playerid,hp[playerid]);
            GetPlayerArmour(playerid,armour[playerid]);
            SendClientMessage(playerid,green, "|---------------------|");
                SendClientMessage(playerid,green, "|-God-Mode-On-|");
                SendClientMessage(playerid,green, "|---------------------|");
                }
                else if(GodMode[playerid] == 1)
        {
            GivePlayerWeapon(playerid,29,150);
            GodMode[playerid] = 0;
            SetPlayerHealth(playerid,hp[playerid]);
            SetPlayerArmour(playerid,armour[playerid]);
            SetVehicleHealth(GetPlayerVehicleID(playerid),1250.0);
            SendClientMessage(playerid,red, "|---------------------|");
                SendClientMessage(playerid,red, "|-God-Mode-Off-|");
                SendClientMessage(playerid,red, "|---------------------|");
                }


        return 1;
}

public OnPlayerConnect(playerid)
{
	SendClientMessage(playerid,green,"This server uses scripts by Redbull[GD]");
	return 1;
}
Please help me i m new
Thanks in Advance
Reply


Messages In This Thread
Help for script - by RedbullGD - 08.03.2014, 14:12
Re: Help for script - by Matess - 08.03.2014, 14:21
Re: Help for script - by RedbullGD - 08.03.2014, 14:27
Re: Help for script - by Matess - 08.03.2014, 14:35
Re: Help for script - by tyler12 - 08.03.2014, 14:57
Re: Help for script - by XK - 08.03.2014, 15:00

Forum Jump:


Users browsing this thread: 1 Guest(s)