SA-MP Forums Archive
Server close :S - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Server close :S (/showthread.php?tid=225429)



Server close :S - Elviss - 13.02.2011

Hello!
If i use /changename then server close :S
What is the error?


Re: Server close :S - Elviss - 13.02.2011

i need faster help


Re: Server close :S - Calgon - 13.02.2011

The code for your /changename command is probably faulty, post the code for the command or nobody will be able to help you.


Re: Server close :S - Elviss - 13.02.2011

thanks :P
This on FS and there have my AFK system to
pawn Код:
if(strcmp(cmd, "/changename", true) == 0)
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        new tmpp[256];
        new string[256];
        tmpp = strtok(cmdtext, idx);
        if(!strlen(tmpp))
        {
            SendClientMessage(playerid, COLOR_BLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
            return 1;
        }
        giveplayerid = strval(tmpp);
        tmp = strtok(cmdtext, idx);
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        //if(IsPlayerConnected(playerid))
        {
            //if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    SetPlayerName(giveplayerid, tmp);
                    format(string, sizeof(string), "AdmCMD: %s(%i) has changed Your name to %s", sendername, playerid, tmp);
                    SendClientMessage(giveplayerid, COLOR_BLUE, string);
                    format(string, sizeof(string), "AdmCMD: You have changed ID %i's name to %s", giveplayerid, tmp);
                    SendClientMessage(playerid, COLOR_BLUE, string);
                }
                else
                {
                    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
                    SendClientMessage(playerid, COLOR_RED, string);
                }
            }
        }
        return 1;
    }



Re: Server close :S - Elviss - 13.02.2011

And i need this whor rcon admin :P


Re: Server close :S - SkizzoTrick - 13.02.2011

1.Stop doubleposting
2.Wrong section