Quote:
Originally Posted by hleV
Thanks again. Method 2 works fine.
But I'm interested in method 1. Can I make so A would see "You are cool!" and B would see "%s is awesome!"? I mean 2 totally different texts with the name included into the second one?
BTW I'm using something similar to this (except the print method):
PHP Code:
new g_Text1[] = "You are cool!" new g_Text2[] = "%s is awesome!" // So I want to use this: public SomeFuction(KillerID) for (new id = 1; id <= get_maxplayers(); id++) show_hudmessage(id, "%s", id == KillerID ? g_Text1 : g_Text2/*But need to include KillerName*/)
|
Code:
public SomeFuction(KillerID)
{
new name[32]
for (new id = 1; id <= get_maxplayers(); id++)
{
if(!is_user_connected(id))
continue
if(id == KillerID)
show_hudmessage(id, "You are cool")
else
{
get_user_name(id,name,31)
show_hudmessage(id, "%s is awesome!",name)
}
}
}