BAN command problem
#1

Could someone edit this ban command? I tried to ban a NPC, but i got banned from the server my self.

Код:
if(!strcmp(cmdtext, "/ban", true,4))
{
new vardas[MAX_PLAYER_NAME];
strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
if(!strcmp(vardas, "0", true) ){SendClientMessage(playerid, COLOR, "* Blokuoti zaideja: /ban [dalis vardo]"); return 1;}
new id = GetPlayeridMid(vardas);
if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, COLOR, "* Tokio zaidejo nera"); return 1;}
if (playerDB[id][admin]){ SendClientMessage(playerid, COLOR, "* Administratoriaus ismesti negalima."); return 1;}

SetPVarInt(playerid, "playerid", playerid);
ShowPlayerDialog(playerid, 40, DIALOG_STYLE_LIST,"Blokavimo Priezastis","Zaidima palengvinancios programos\nReklamavimas\nNepagarba\nDeathMatch\nKita","Blokuoti","Atsaukti");
return 1;
}
Код:
if(dialogid == 40) {
if(response) {
BanEx(GetPVarInt(playerid, "playerid"), inputtext);
}
DeletePVar(playerid, "playerid");
return true;
}
It would be nice if someone added this and made it work to the command in the OnDialogResponse, I have dificulties saving names and similar stuff from a command to OnDialogResponse, i would be very grateful for it.

Код:
new msg[128];
format(msg,sizeof(msg),"[BAN] %s bannned player %s: (%s).",adminame,name,inputtext);
SendClientMessageToAll(COLOR,msg);
Reply


Messages In This Thread
BAN command problem - by Osviux - 26.05.2011, 15:45
Re: BAN command problem - by JaTochNietDan - 26.05.2011, 15:50
Re: BAN command problem - by Osviux - 26.05.2011, 16:15
Re: BAN command problem - by JaTochNietDan - 26.05.2011, 16:19
Re: BAN command problem - by Osviux - 26.05.2011, 16:24
Re: BAN command problem - by Max_Coldheart - 26.05.2011, 16:26
Re: BAN command problem - by Osviux - 26.05.2011, 16:29
Re: BAN command problem - by JaTochNietDan - 26.05.2011, 16:30
Re: BAN command problem - by Osviux - 26.05.2011, 16:55

Forum Jump:


Users browsing this thread: 2 Guest(s)