SA-MP Forums Archive
ID 0 Fucked up.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ID 0 Fucked up.. (/showthread.php?tid=279906)



ID 0 Fucked up.. - The Woody - 29.08.2011

Okay.. The server lagged a bit and after that every ids is now id 0 when ever i use a command like /kick 1 it kicks id 0 if i say /kick 100000 it kicks id 0 every body is id 0.. And i didnt do any script changes before this happend. All worked fine but then it lagged and suddently this happend. Has anybody any idea what the problem could be?
Ive checked on OnPlayerConnect and everything seems to be fine? im not using MySQL so could some files be corrupted or something?. I have no idea please help.

Ps. The only changes i made before this happend is i updated to R5 but i don't think that has anything to do with it.


Re: ID 0 Fucked up.. - =WoR=G4M3Ov3r - 29.08.2011

Show me the /kick code. And did this happen before ?


Re: ID 0 Fucked up.. - The Woody - 29.08.2011

Quote:
Originally Posted by G4M3Ov3r
View Post
Show me the /kick code. And did this happen before ?
It is ALL commands. And it has never happend before.

However this is the kick command:
pawn Code:
command(kick, playerid, params[])
{
    new id, reason[128], string[ 128 ];
    if( sscanf( params, "us[128]", id, reason) )
    {
        if( Player[playerid][AdminLevel] >= 1 )
        {
            SendClientMessage( playerid, WHITE, "SYNTAX: /kick [playerid] [reason]" );
        }
    }
    else
    {
        if( Player[playerid][AdminLevel] >= 1)
        {
            if(IsPlayerConnected(id) )
            {
                if( Player[id][AdminLevel] > Player[playerid][AdminLevel])
                {
                    SendClientMessage( playerid, WHITE, "You do not have the authority to do that (higher rank)." );
                    return 1;
                }
               
                format( string, sizeof( string ), "Kick: %s has been kicked by %s, reason: %s", GetName(id), Player[playerid][AdminName], reason);
                SendClientMessageToAll(LIGHTRED, string);
                AdminActionsLog( string );
                format( string, sizeof( string ), "You have been kicked from the server for %s", reason);
                SendClientMessage(id, WHITE, string);
                Kick(id);
            }
            else
            {
                SendClientMessage( playerid, WHITE, "That player is not connected." );
                return 1;
            }
        }
    }
    return 1;
}



Re: ID 0 Fucked up.. - =WoR=Varth - 29.08.2011

Download the latest sscanf2


Re: ID 0 Fucked up.. - =WoR=G4M3Ov3r - 29.08.2011

Quote:
Originally Posted by varthshenon
View Post
Download the latest sscanf2
Just saw the edit The Woody edited, And indeed you need the sscanf2 plugin updated

http://forum.sa-mp.com/showthread.ph...ghlight=sscanf


Re: ID 0 Fucked up.. - The Woody - 29.08.2011

Quote:
Originally Posted by varthshenon
View Post
Download the latest sscanf2
Quote:
Originally Posted by G4M3Ov3r
View Post
Just saw the edit The Woody edited, And indeed you need the sscanf2 plugin updated

http://forum.sa-mp.com/showthread.ph...ghlight=sscanf
Thank you both . It worked thanks!