sscanf2/cmd crash login dialogs
#1

Hello!

im using the login from the tutorial https://sampforum.blast.hk/showthread.php?tid=269361

When i include only #include <sscanf2> you can register and login.
Looks like this.


with the /settadmin command in the GM it looks like this.


And if you try to spawn it looks like this.


Here is the code i use when you cant login or spawn (im getting no warnings etc at all)
pawn Код:
CMD:setadmin(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
     if(IsPlayerAdmin(playerid))
        {
            new sendername[MAX_PLAYER_NAME];
            new giveplayername[MAX_PLAYER_NAME];
            new giveplayerid,level;
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
            if (!sscanf(params, "ii", giveplayerid,level))
            {
                if (giveplayerid != INVALID_PLAYER_ID)
                {
                    new string[128];
                    format(string, sizeof(string), "The admin %s has made you a level %d admin",sendername,level);
                    SendClientMessage(giveplayerid, COLOR_GRAD1, string);
                    format(string, sizeof(string), "You have made %s a level %d admin",giveplayername,level);
                    SendClientMessage(playerid, COLOR_GRAD1, string);
                    pInfo[giveplayerid][Admin] = level;
                }
            }
            else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setadmin [playerid] [level] 1-5");
        }
        else SendClientMessage(playerid, 0xFF0000FF, "You are not a owner Admin!");
    }
    return 1;
}
Reply


Messages In This Thread
sscanf2/cmd crash login dialogs - by cruising - 09.10.2011, 18:37
Re: sscanf2/cmd crash login dialogs - by WoodPecker - 09.10.2011, 18:39
Re: sscanf2/cmd crash login dialogs - by [MWR]Blood - 09.10.2011, 18:40
Re: sscanf2/cmd crash login dialogs - by cruising - 09.10.2011, 18:44
Re: sscanf2/cmd crash login dialogs - by cruising - 09.10.2011, 18:48
Re: sscanf2/cmd crash login dialogs - by cruising - 09.10.2011, 22:00
Re: sscanf2/cmd crash login dialogs - by cruising - 10.10.2011, 03:17
Re: sscanf2/cmd crash login dialogs - by [MG]Dimi - 10.10.2011, 06:12

Forum Jump:


Users browsing this thread: 2 Guest(s)