PHP Code:
new g_SyncObj
public plugin_init() {
register_plugin("PLUGIN1", "1.0", "Waleed")
g_syncObj = CreateHudSyncObj()
}
public client_putinserver(playerid){
if(is_user_connected(playerid)){
new string[100];
new name[32]
get_user_name(playerid, name, charsmax(name))
format(string, sizeof(string), "%s has joined the server!", name);
set_hudmessage(0, 255, 0, 33.0, 31.0, 0, 6.0, 30.0, 1.0, 10.0)
ShowSyncHudMsg(playerid, g_SyncObj, "Welcome to my server")
return 1;}}
Change your hud message to a sync hud, changed your hud placement (using AMXX-Studio's HUD generator) to be just above the crossahair (-1 -1 hasn't worked for me in the past)
And put it on a task. VeCo is right.
I also suppose you'd like string[] to be displayed to everyone else. You'll have to loop through all clients and desplay it to them individually.