10.12.2010, 14:31
I want to log the ban to here: scriptfiles/Lbans/PLAYERNAME.LBAN
and.. after i banned the player, and he try to reconnect i want it to say
You are banned from this server
Reason: REASON
Like it is now it just say: You are banned from this server.
Like it is now:
1. Click at plyer you want to ban
2. Type message (reason to ban)
3. Player get banned and this text show for him: You have been banned from this server
-------------------------------------------------THE REASON I TYPED COMES HERE
4. This text shows for evryone: **(ADMIN BAN)** PLAYERNAME(ID) REASON FOR WHY HE GOT BANNED
and.. after i banned the player, and he try to reconnect i want it to say
You are banned from this server
Reason: REASON
Like it is now it just say: You are banned from this server.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Text for Ban", "Enter the reason to ban", "Submit", "Cancel");
}
}
case 2:
{
if(strlen(inputtext) > 50)
return SendClientMessage(playerid, 0xFFFFFFFF, "ERROR: Your message was too long. Max: 50 characters");
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(aPlayer[playerid], pName, sizeof(pName));
SendClientMessage(aPlayer[playerid], 0x776655,"You have been banned from this server");
SendClientMessage(aPlayer[playerid], 0x776655,inputtext);
BanEx(aPlayer[playerid],inputtext);
format(string,128,"**(ADMIN BAN)** %s(%d) %s", pName, playerid, inputtext);
SendClientMessageToAll(0x556677,string);
aPlayer[playerid] = 0;
}
}
}
return 1;
}
1. Click at plyer you want to ban
2. Type message (reason to ban)
3. Player get banned and this text show for him: You have been banned from this server
-------------------------------------------------THE REASON I TYPED COMES HERE
4. This text shows for evryone: **(ADMIN BAN)** PLAYERNAME(ID) REASON FOR WHY HE GOT BANNED