How to add god mode in Game Mode
#6

PHP код:
new godmode[MAX_PLAYERS]; // Add this to the top of your script under the includes.
//The god command made using OnPlayerCommandText.Just copy paste this code.
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (
strcmp("/god", cmdtext, true, 10) == 0)
    {
        if(
godmode[playerid] == 0)
        {
            
SetPlayerHealth(playerid, 100000);
            
GameTextForPlayer(playerid,"~w~God Mode ~g~enabled!", 5000, 6);
            
godmode[playerid] = 1;
        }
        else if(
godmode[playerid] == 1)
        {
            
SetPlayerHealth(playerid, 100);
            
GameTextForPlayer(playerid,"~w~God Mode ~r~disabled!", 5000, 6);
            
godmode[playerid] = 1;
        }
        return 
1;
    }
    return 
0;
} 
Reply


Messages In This Thread
How to add god mode in Game Mode - by 4ss4ssin - 10.07.2015, 13:40
Re: How to add god mode in Game Mode - by Mouiz - 10.07.2015, 13:46
Re: How to add god mode in Game Mode - by 4ss4ssin - 10.07.2015, 14:28
Re: How to add god mode in Game Mode - by notime - 10.07.2015, 14:31
Re: How to add god mode in Game Mode - by 4ss4ssin - 10.07.2015, 14:42
Re: How to add god mode in Game Mode - by Vicky69 - 10.07.2015, 15:07
Re: How to add god mode in Game Mode - by DRCharlie - 10.07.2015, 15:19

Forum Jump:


Users browsing this thread: