View Single Post
Visual77
Veteran Member
Join Date: Jan 2009
Old 07-26-2012 , 15:46   Re: Tank Damage Announce by griffin
Reply With Quote #14

Shavit,your edit is wrong and is what gives him the errors. %N is used only to retrive the name from the client index without declaring any strings.
%s is used to retrive the name from a string, in this case from decl String:name[MAX_NAME_LENGTH]; and GetClientName(tankclient, name, sizeof(name));

PHP Code:
PrintToChatAll("[HP TANK] Il reste %N HP a (%d)."nameg_iLastTankHealth); 
should be
PHP Code:
PrintToChatAll("[HP TANK] Il reste %s HP a (%d)."nameg_iLastTankHealth); 
TheTwistedPanda also showed a better, example on page 1 which I'd recommend using instead.
https://forums.alliedmods.net/showpost.php?p=1757501&postcount=9

Last edited by Visual77; 07-26-2012 at 16:02.
Visual77 is offline