Admin rights!
#6

Quote:
Originally Posted by Someone
SetPlayerHealth(playerid, 10000000);
This is not a good way to do it.
Better do it like:
pawn Код:
#define INFINITY 10000000 //This goes to top of script

CMD:god(playerid, params[])  //Defining the command name (requires ZCMD)
{
    if(IsPlayerAdmin(playerid)) //Checking if player is RCON admin
    {
        SetPlayerHealth(playerid, INFINITY);  //Setting health to defined amount
        SetPlayerArmour(playerid, INFINITY);  //Setting armour to defined amount
    }
    else //If he is NOT RCON admin
    {
        SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); //Sends a message to the player
    }
    return 1; //Tells the compiler that it compiled successfully
}
Reply


Messages In This Thread
Admin rights! - by samtey - 30.07.2011, 08:28
Re: Admin rights! - by Kush - 30.07.2011, 08:37
AW: Admin rights! - by samtey - 30.07.2011, 08:47
Re: Admin rights! - by Markx - 30.07.2011, 08:52
Re: Admin rights! - by Kush - 30.07.2011, 08:53
Re: Admin rights! - by Max_Coldheart - 30.07.2011, 08:55
AW: Admin rights! - by samtey - 30.07.2011, 08:56
Re: Admin rights! - by Double-O-Seven - 30.07.2011, 08:57
Re: Admin rights! - by Max_Coldheart - 30.07.2011, 09:00
Re: Admin rights! - by Kush - 30.07.2011, 09:00
Re: Admin rights! - by Max_Coldheart - 30.07.2011, 09:04
AW: Admin rights! - by samtey - 30.07.2011, 09:07
Re: AW: Admin rights! - by Kush - 30.07.2011, 09:12
Re: Admin rights! - by Markx - 30.07.2011, 09:19
AW: Admin rights! - by samtey - 30.07.2011, 09:19
Re: AW: Admin rights! - by Kush - 30.07.2011, 09:37
Re: AW: Admin rights! - by Markx - 30.07.2011, 10:08
AW: Re: AW: Admin rights! - by samtey - 30.07.2011, 10:22
Re: AW: Admin rights! - by Kush - 30.07.2011, 15:08

Forum Jump:


Users browsing this thread: 1 Guest(s)