[Tutorial] How to make /godon and /godoff commands. (Explaining)
#2

Nice Sir, But use this
PHP код:
#include <a_samp>
#include <zcmd>
new god[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
    
god[playerid] = 0;
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
god[playerid] = 0;
    return 
1;
}
CMD:god(playeridparams[])
{
    if(
IsPlayerAdmin(playerid) || god[playerid] == 0)
    {
        
god[playerid] = 1;
        
SetPlayerHealth(playerid99999999);
        
SetPlayerArmour(playerid99999999);
        
SendClientMessage(playerid, -1"You Turn Godmode To ON!");
    }
    if(
IsPlayerAdmin(playerid) || god[playerid] == 1)
    {
        
god[playerid] = 0;
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid0);
        
SendClientMessage(playerid, -1"You Turn Godmode To OFF!");
    }
    return 
1;

Reply


Messages In This Thread
How to make /godon and /godoff commands. (Explaining) - by Goldino - 21.02.2013, 11:14
Re: How to make /godon and /godoff commands. (Explaining) - by faiznurfaza - 21.02.2013, 11:20
Re: How to make /godon and /godoff commands. (Explaining) - by RajatPawar - 21.02.2013, 11:24
Re: How to make /godon and /godoff commands. (Explaining) - by Goldino - 21.02.2013, 11:30

Forum Jump:


Users browsing this thread: 1 Guest(s)