on player dissconet black message
#1

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);
                    }
        } 
Reply
#2

Show us case 3: uner onplayerdisconnect since that is the kick reason.
Reply
#3

i don't have one because i don't want to see kicked players.
Reply
#4

Show us the kick command atleast?
Reply
#5

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

Maybe remove this
pawn Код:
for(new i=0; i < 100; i++)    SendClientMessage(id, -1, "");
Reply
#7

nah, wasn't from that anyway, i fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)