on player dissconet black message -
Bogdan1992 - 05.03.2012
How can i get rid of the empty spaces? That happens when someone get's kicked.
Ofc if i don't want to add the case 2.
This is from OnPlayerDissconect
PHP код:
switch(reason){
case 0: {
format(str, sizeof(str), "%s has left the server. (Lost Connection)", pname);
SendClientMessageToAll(COLOR_GREY, str);
}
case 1: {
format(str, sizeof(str), "%s has left the server.", pname);
SendClientMessageToAll(COLOR_GREY, str);
}
}
Re: on player dissconet black message -
Walsh - 05.03.2012
Show us case 3: uner onplayerdisconnect since that is the kick reason.
Re: on player dissconet black message -
Bogdan1992 - 05.03.2012
i don't have one because i don't want to see kicked players.
Re: on player dissconet black message - T0pAz - 05.03.2012
Show us the kick command atleast?
Re: on player dissconet black message -
Bogdan1992 - 05.03.2012
PHP код:
CMD:kick(playerid, params[]){
new reason[100];
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
if(sscanf(params,"i",id)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: {FFFFFF}/kick [id] ([reason])");
sscanf(params,"is[100]",id,reason);
if(!IsPlayerConnected(id) || id == playerid) return SendClientMessage(playerid, COLOR_RED, "ERROR: {FFFFFF}This player is offline or it is yourself.");
if( PlayerInfo[playerid][pAdmin] <= PlayerInfo[id][pAdmin]) return SendClientMessage( playerid, COLOR_RED, "ERROR: {FFFFFF}Your not authorized to use this command on an higher admin or same." );
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(id, name, sizeof(name));
if(!strlen(reason))
{
format(str, sizeof str, "- %s has been kicked from this server -",name);
} else {
format(str, sizeof str, "- %s has been kicked from this server - %s.",name, reason);
}
format(strings, sizeof strings, "Admin-Log: %s has kicked %s", pname, name);
SendAdminMessage(COLOR_RED, strings );
for(new i=0; i < 100; i++) SendClientMessage(id, -1, "");
SendClientMessage(id, COLOR_GREY, "- You have been kicked from this server.");
TogglePlayerControllable(id,false);
Kick(id);
SendClientMessageToAll(COLOR_RED, str);
return 1;
}
Re: on player dissconet black message - T0pAz - 05.03.2012
Maybe remove this
pawn Код:
for(new i=0; i < 100; i++) SendClientMessage(id, -1, "");
Re: on player dissconet black message -
Bogdan1992 - 05.03.2012
nah, wasn't from that anyway, i fixed.