OMG! one command disables another!
#1

Hi @ll
Look at these errors!

Код:
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(185) : warning 225: unreachable code
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(185) : error 029: invalid expression, assumed zero
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(185) : error 017: undefined symbol "cmd_kick"
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(185) : error 029: invalid expression, assumed zero
D:\Program Files\Rockstar Games\GTA San Andreas\eigener SAMP\gamemodes\deathmatch.pwn(185) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
I just added this!

pawn Код:
CMD:og(playerid, params[])
{
    new
        gangsterlevel, id;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(sscanf(params, "ui", id, gangsterlevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /set_glevel [id] [gangsterlevel]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        new
            str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i", PlayerName(playerid), playerid, PlayerName(id), id, gangsterlevel);
        SendClientMessage(playerid, COLOR_YELLOW, str);
        if(INI_Open(getINI(playerid)))
        {
            INI_WriteInt("GangsterLvl", gangsterlevel);
            new
                pts = INI_ReadInt("RespectPts");
            if(pts <= 90)
            {
                INI_WriteInt("RespectPts", pts + 10);
            }
            else
            {
                INI_WriteInt("RespectPts", 100);
            }
            INI_Save();
            INI_Close();
        }
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");
My kick command is fucked up! Until I added, everythin' worked fine!
Reply
#2

BUMP! I need help!
Reply
#3

pawn Код:
CMD:og(playerid, params[])
{
    new
        gangsterlevel, id;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(sscanf(params, "ui", id, gangsterlevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /set_glevel [id] [gangsterlevel]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        new
            str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i", PlayerName(playerid), playerid, PlayerName(id), id, gangsterlevel);
        SendClientMessage(playerid, COLOR_YELLOW, str);
        if(INI_Open(getINI(playerid)))
        {
            INI_WriteInt("GangsterLvl", gangsterlevel);
            new
                pts = INI_ReadInt("RespectPts");
            if(pts <= 90)
            {
                INI_WriteInt("RespectPts", pts + 10);
            }
            else
            {
                INI_WriteInt("RespectPts", 100);
            }
            INI_Save();
            INI_Close();
        }
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");
}
U forgot a '}' at the end
Reply
#4

Ok thanks, but one more thing! If I type /og [id] OG, server writes: USAGE: /og [id] [gangsterlevel]
But when I write /og [id] [any number] It says blah has set blahs gangsterlevel to OG! But I want that it get with OG!

PHP код:
CMD:og(playeridparams[])
{
    new
        
gangsterlevelid;
    if(
PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(
sscanf(params"ui"idgangsterlevel)) return SendClientMessage(playeridCOLOR_RED"USAGE: /og [id] [gangsterlevel]");
        if(
id == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_RED"System: Invalid ID");
        new
            
str[128];
        
format(str,128,"System: Administrator %s [ID %d] has set %s [ID %d] gangsterlevel to OG"PlayerName(playerid), playeridPlayerName(id), idgangsterlevel);
        
SendClientMessage(playeridCOLOR_YELLOWstr);
        if(
INI_Open(getINI(playerid)))
        {
            
INI_WriteInt("GangsterLvl"gangsterlevel);
            new
                
pts INI_ReadInt("RespectPts");
            if(
pts <= 90)
            {
                
INI_WriteInt("RespectPts"pts 10);
            }
            else
            {
                
INI_WriteInt("RespectPts"100);
            }
            
INI_Save();
            
INI_Close();
        }
        return 
1;
    }
    else return 
SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");

ANY HELP?
Reply
#5

PLS HELP!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)