/warn is not working
#4

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
pawn Код:
dcmd_warn(playerid,params[])
{
    new giveplayerid, cmdreason[64];
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "You're not authorized to use this command!");
    if(sscanf(params,"us[64]", giveplayerid, cmdreason)) SendClientMessage(playerid,COLOR_NUB,"USAGE: /warn <ID> <Reason>");
    if(strlen(cmdreason) > 64) return SendClientMessage(playerid, COLOR_NUB, "Reason must be less than 65 characters long.");
    new string[150], giveplayer[MAX_PLAYER_NAME];
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    if(giveplayerid == INVALID_PLAYER_ID || !IsPlayerConnected(giveplayerid))
    {
        format(string,sizeof(string),"The player ID %s[%i] is not connected to the server. You cannot warn him.",giveplayer,giveplayerid);
        return SendClientMessage(playerid,COLOR_NUB,string);
    }
    format(string,sizeof(string),"{FFFFFF}__**Punished**__{FFFFFF} %s(%d) Has been warned. {FFFFFF}Reason: %s{FFFFFF}",giveplayer,giveplayerid,cmdreason);
    SendClientMessageToAll(-1,string);
    }
    return 1;
}
Only a few little mistakes.
Wait how? It's just a few like additions.

EDIT: And some edits, but in other ways than mines.
Reply


Messages In This Thread
/warn is not working - by mailu - 02.01.2013, 19:56
Re: /warn is not working - by JustinAn - 02.01.2013, 21:18
Re: /warn is not working - by Threshold - 02.01.2013, 21:23
Re: /warn is not working - by JustinAn - 02.01.2013, 22:22
Re: /warn is not working - by ThePhenix - 02.01.2013, 22:30
Re: /warn is not working - by JustinAn - 03.01.2013, 03:06

Forum Jump:


Users browsing this thread: 1 Guest(s)