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(strsizeof(str), "%s has left the server. (Lost Connection)"pname);
                        
SendClientMessageToAll(COLOR_GREYstr);
                    }
            case 
1: {
                        
format(strsizeof(str), "%s has left the server."pname);
                        
SendClientMessageToAll(COLOR_GREYstr);
                    }
        } 
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(playeridparams[]){
    new 
reason[100];
    if(
PlayerInfo[playerid][pAdmin] < 1) return 0;
    if(
sscanf(params,"i",id)) return SendClientMessage(playeridCOLOR_LIGHTBLUE"USAGE: {FFFFFF}/kick [id] ([reason])");
     
sscanf(params,"is[100]",id,reason);
     if(!
IsPlayerConnected(id) || id == playerid) return SendClientMessage(playeridCOLOR_RED"ERROR: {FFFFFF}This player is offline or it is yourself.");
    if( 
PlayerInfo[playerid][pAdmin] <= PlayerInfo[id][pAdmin]) return SendClientMessageplayeridCOLOR_RED"ERROR: {FFFFFF}Your not authorized to use this command on an higher admin or same." );
    
GetPlayerName(playeridpnamesizeof(pname));
     
GetPlayerName(idnamesizeof(name));
     if(!
strlen(reason))
    {
        
format(strsizeof str"- %s has been kicked from this server -",name);
    } else {
        
format(strsizeof str"- %s has been kicked from this server - %s.",namereason);
    }
     
format(stringssizeof strings"Admin-Log: %s has kicked %s"pnamename);
    
SendAdminMessage(COLOR_REDstrings );
    for(new 
i=0100i++)    SendClientMessage(id, -1"");
    
SendClientMessage(idCOLOR_GREY"- You have been kicked from this server.");
    
TogglePlayerControllable(id,false);
    
Kick(id);
     
SendClientMessageToAll(COLOR_REDstr);
    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: 2 Guest(s)