Server close :S
#4

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;
    }
Reply


Messages In This Thread
Server close :S - by Elviss - 13.02.2011, 17:10
Re: Server close :S - by Elviss - 13.02.2011, 17:27
Re: Server close :S - by Calgon - 13.02.2011, 17:34
Re: Server close :S - by Elviss - 13.02.2011, 18:52
Re: Server close :S - by Elviss - 13.02.2011, 19:06
Re: Server close :S - by SkizzoTrick - 13.02.2011, 19:11

Forum Jump:


Users browsing this thread: 3 Guest(s)