Im making an plugin and I have some problems with it
The code is correctly but it doesnt work as needed
Insted of showing player/user name it shows server name
The code below
p.s : dir = filename and directory
Code:
public hudmessage(id)
{
if(!file_exists(dir))
{
write_file(dir,"%s Welcome to our Server ! GL & HF",_)
}
new szText[64], len
format(szText, 63, dir)
read_file(dir,0,szText,63,len)
new szName[32]
get_user_name(id,szName,charsmax(szName))
replace(szText,64,"%s",szName)
set_hudmessage(0, 255, 0, 0.38, 0.56, 0, 6.0, 12.0)
show_hudmessage(id, "%s" ,szText)
}
Any way to solve this problem