AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Display death message (https://forums.alliedmods.net/showthread.php?t=211068)

WolfGang 03-17-2013 20:23

Display death message
 
I'd tried this but no message showed up when killed by a infected or survivor, is this how you print a player death message?
PHP Code:

else if(GetClientTeam(client) == && GetClientTeam(client) == 3)
        {
            
decl String:vName[MAX_NAME_LENGTH];
            
GetClientName(attackervNamesizeof(vName));
            if(
notifyPrintToChat(client"%s %T"MSGTAG"Killed Message"LANG_SERVERvName);
        } 

Code:

"Killed Message"
        {
                "#format"        "{1:s}"
                "en"                "You were Killed by {1}"
        }


thetwistedpanda 03-17-2013 21:10

Re: Display death message
 
PHP Code:

if(GetClientTeam(client) == && GetClientTeam(client) == 3

Will never be true as a client cannot be on both teams 2 and 3. && is AND, || is OR.
</span></span>

WolfGang 03-17-2013 23:04

Re: Display death message
 
I'm still new to source pawn. So would it be ... ?

PHP Code:

else if(GetClientTeam(client) == || GetClientTeam(client) == 3)
        {
            
decl String:vName[MAX_NAME_LENGTH];
            
GetClientName(attackervNamesizeof(vName));
            if(
notifyPrintToChat(client"%s %T"MSGTAG"Killed Message"LANG_SERVERvName);
        } 


PriceLess 03-17-2013 23:18

Re: Display death message
 
Quote:

Originally Posted by WolfGang (Post 1914796)
I'm still new to source pawn. So would it be ... ?

PHP Code:

else if(GetClientTeam(client) == || GetClientTeam(client) == 3)
        {
            
decl String:vName[MAX_NAME_LENGTH];
            
GetClientName(attackervNamesizeof(vName));
            if(
notifyPrintToChat(client"%s %T"MSGTAG"Killed Message"LANG_SERVERvName);
        } 


yes.


All times are GMT -4. The time now is 05:41.

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