God Mode
#7

lol? why create new variable? use pvars

Code:
if(strcmp(cmd, "/god", true) == 0)
    {
       if(IsPlayerConnected(playerid))
       {
        new pname[MAX_PLAYER_NAME], string[40 + MAX_PLAYER_NAME];
        GetPlayerName(playerid, pname, sizeof(pname));
        if(GetPVarInt(playerid, "God") == 1)
        {
        SetPVarInt(playerid, "God", 0);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        format(string, sizeof(string), "[OPERATOR] %s has ended using God Mode using /god", pname);
        SendClientMessageToAll(0x3F9E4DAA, string);
        }
        else
        {
        SetPVarInt(playerid, "God", 1);
        SetPlayerHealth(playerid, 9999);
        SetPlayerArmour(playerid, 9999);
        format(string, sizeof(string), "[OPERATOR] %s has entered God Mode using /god", pname);
        SendClientMessageToAll(0x3F9E4DAA, string);
        }
        return 1;

     }
Reply


Messages In This Thread
God Mode - by Garc1a - 29.10.2010, 14:40
Re: God Mode - by willsuckformoney - 29.10.2010, 14:43
Re: God Mode - by iggy1 - 29.10.2010, 14:45
Re: God Mode - by Garc1a - 29.10.2010, 14:54
Re: God Mode - by Agovic - 29.10.2010, 15:02
Re: God Mode - by Garc1a - 29.10.2010, 15:03
Re: God Mode - by i514x - 29.10.2010, 15:10
Re: God Mode - by TheHoodRat - 29.10.2010, 15:10
Re: God Mode - by Garc1a - 29.10.2010, 15:15
Re: God Mode - by i514x - 29.10.2010, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)