Commands doesn't work!
#11

PHP код:
CMD:energy(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid0x0022FFFF"You are not an administrator, so you can't use this command!");
    new 
ID;
    if(
sscanf(params"u"ID)) return SendClientMessage(playerid0x0022FFFF"USAGE: /energy");
    
SetPlayerHealth(ID100);
    return 
1;
}
CMD:kick(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not an administrator, so you can't use this command!");
    new 
PID;
    if(
sscanf(params"u"PID)) return SendClientMessage(playeridCOLOR_GREY"USAGE: /kick [playerid] [reason]");
    if(!
IsPlayerConnected(PID)) return SendClientMessage(playeridCOLOR_GREY"Player is not connected!");
    
Kick(PID);
    return 
1;
}
CMD:teleport(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not an administrator, so you can't use this command!");
    new 
ID;
    if(
sscanf(params"u"ID)) SendClientMessage(playeridCOLOR_GREY"USAGE: /goto [playerid]");
    if(!
IsPlayerConnected(ID)) SendClientMessage(playeridCOLOR_GREY"Player is not connected!");
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
SetPlayerPos(IDx+1y+1z);
    return 
1;
}
CMD:god(playeridparams[])
{
    
#pragma unused params
    
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1"You are not an admin");
    if(!
HasGod[playerid])
    {
        
HasGod[playerid] = 1;
        
SendClientMessage(playerid, -1"God mode turned on!");
    }
    else
    {
        
HasGod[playerid] = 0;
        
SendClientMessage(playerid, -1"God mode turned off!");
    }
    return 
1;

Reply


Messages In This Thread
Commands doesn't work! - by samtey - 30.07.2011, 15:53
AW: Commands doesn't work! - by Tigerkiller - 30.07.2011, 15:59
Re: Commands doesn't work! - by VitalRP - 30.07.2011, 16:01
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:02
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:07
Re: Commands doesn't work! - by Kush - 30.07.2011, 16:14
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:21
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:27
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:29
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:39
Re: Commands doesn't work! - by Shadoww5 - 30.07.2011, 16:40
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:48
Re: AW: Commands doesn't work! - by Kush - 30.07.2011, 16:53
Re: Commands doesn't work! - by Toreno - 30.07.2011, 16:54
AW: Commands doesn't work! - by samtey - 30.07.2011, 16:59
Re: Commands doesn't work! - by Beanz - 30.07.2011, 17:02
Re: Commands doesn't work! - by Kush - 30.07.2011, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)