AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Kick player message error (https://forums.alliedmods.net/showthread.php?t=317705)

pentakill 07-25-2019 06:53

Kick player message error
 
PHP Code:

public _expulsar(id)
{
    new 
Tid g_iTarget[id]
    static 
szReason[1024]
    
read_args(szReasoncharsmax(szReason))
    
remove_quotes(szReason)
    
    
ColorChat(0GREY"^04[wS] ^01Player: ^04%s ^03kicked ^01by: ^04%s. ^01Reason: ^04%s^03."szName[Tid], szName[id], szReason)
    
    
format(szReasoncharsmax(szReason), "Kicked by %s^nReason: %s"szName[id], szReason)
    
server_cmd("kick #%d ^"%s^""get_user_userid(Tid), szReason)
    
    return 
PLUGIN_HANDLED


The mod nickname that appears when the player is kicked on the server is right, but on the client side when he is kicked the mod nickname is wrong all the time (hooks another player name)
I hook the name on server connect and info changed, and in all my other plugins it works fine

OciXCrom 07-25-2019 07:18

Re: Kick player message error
 
Show how you're "hooking" the names.


All times are GMT -4. The time now is 17:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.