help please
#1

this code makes me turn off the server

pawn Код:
CMD:setmyname(playerid, params[])
    {
        new string[128];
        if(IsNull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USE: /setmyname [New name]");
        if (Info[playerid][pAdmin] >= 4)
        {
            if(GetPVarInt(playerid, "TempName") == 0)
            {

                if(!doesAccountExist(params))
                {
                    format(string, sizeof(string), "AdmCmdExe: %s estб temporalmente con el nombre de %s.",GetPlayerNameEx(playerid), params);
                    ABroadCast(COLOR_ORANGE, string, 1337);
                    format(string, sizeof(string), "Estбs temporalmente con el nombre de %s.", params);
                    SendClientMessageEx(playerid, COLOR_WHITE, string);
                    SendClientMessageEx(playerid, COLOR_GRAD2, "NOTA: No se guardarбn ningъn stat con este nombre.");
                    SetPVarInt(playerid, "TempName", 1);
                    new name[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, name, sizeof(name));
                    SetPVarString(playerid, "TempNameName", name);
                    SetPlayerName(playerid, params);
                    format(string, sizeof(string), "%s ha cambiado su nombre a %s.", name, params);
                    Log("logs/changename.log", string);
                }
                else
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, "Este nombre ya estб registrado.");
                }
            }
            else
            {
                new name[MAX_PLAYER_NAME];
                format(string, sizeof(string), "AdmCmdExe: %s volviу a usar su nombre anterior.",GetPlayerNameEx(playerid));
                ABroadCast(COLOR_ORANGE, string, 1337);
                GetPVarString(playerid, "TempNameName", name, sizeof(name));
                format(string, sizeof(string), "Tu nombre a sido cambiado al anterior: %s", name);
                SendClientMessageEx(playerid, COLOR_WHITE, string);
                SendClientMessageEx(playerid, COLOR_GRAD2, "NOTA: Ahora tus stats se guardarбn.");
                SetPVarInt(playerid, "TempName", 0);
                SetPlayerName(playerid, name);
            }
        }
        else SendClientMessageEx(playerid, COLOR_GRAD2, "No puedes usar este comando.");
        return 1;
    }
Reply
#2

Place prints in there to see where it crashes...
Reply
#3

pawn Код:
[16:48:50] Number of vehicle models: 85
[16:48:53] All DMPS , 3DTextLabels, And Doors loaded !
[16:49:35] Incoming connection: 72.186.111.241:4537
[16:49:35] [join] David_Rain has joined the server (0:72.186.111.241)
[16:52:49] Incoming connection: 190.38.156.98:1767
[16:52:50] [join] Victor_Kraken has joined the server (1:190.38.156.98)
[16:54:33] [death] David_Rain died 255
[16:54:33] sscanf warning: No default value found.
[16:54:50] [death] Victor_Kraken died 255
[16:54:52] sscanf warning: No default value found.
[16:55:26] [chat] [Victor_Kraken]: entrar
[16:55:30] [death] David_Rain died 255
[16:55:50] [chat] [David_Rain]: .jetpack
[16:56:23] [death] Victor_Kraken died 54
[16:57:08] sscanf warning: No default value found.
[16:57:41] [chat] [David_Rain]: .salir
[16:58:46] Incoming connection: 190.38.156.98:1099
[16:58:47] [join] Sebastian_Rojas has joined the server (2:190.38.156.98)
[16:58:51] RCON (In-Game): Player #0 (David_Rain) has logged in.
[17:02:05] sscanf warning: No default value found.
[17:02:22] sscanf warning: No default value found.
[17:05:20] [part] Victor_Kraken has left the server (1:2)
[17:06:02] Incoming connection: 190.38.156.98:1768
[17:06:02] [join] Victor_Kraken has joined the server (1:190.38.156.98)
[17:06:28] [part] Sebastian_Rojas has left the server (2:0)
[17:10:01] Incoming connection: 190.38.156.98:1052
[17:10:02] [join] Sebastian_Rojas has joined the server (2:190.38.156.98)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)