AlliedModders Donor
|
05-08-2020
, 11:06
Re: Help with HUD
|
#3
|
Quote:
Originally Posted by drespy
Try to change HUD channel param, use automatic (-1).
PHP Code:
{ SetHudTextParams(-1.0, 0.0, 5.0, 74, 255, 255, 1, 0, 0.1, 0.1, 0.1); ShowHudText(client, -1, "%N is Simon", Warden); } else { SetHudTextParams(-1.0, 0.0, 5.0, 74, 255, 255, 1, 0, 0.1, 0.1, 0.1); ShowHudText(client, -1, "No simon"); }
|
don't work
Full code:
PHP Code:
int Warden -1;
public void OnPluginStart() { RegConsoleCmd("sm_warden", Command_Warden); }
public Action Command_Warden(int client) { Warden = client; PrintToChat(client, "you are simon!") }
public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast) { CreateTimer(1.0, HudInfoJB, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE); }
public Action HudInfoJB(Handle timer) {
for(int client = 1; client <= MaxClients; client++) { if(IsValidClient(client)) { if(Warden == 1) { SetHudTextParams(-1.0, 0.0, 5.0, 74, 255, 255, 5, 0, 0.1, 0.1, 0.1); ShowHudText(client, 1, "Simon is: %N", Warden); } else { SetHudTextParams(-1.0, 0.0, 5.0, 74, 255, 255, 5, 0, 0.1, 0.1, 0.1); ShowHudText(client, 1, "No Simon!"); } } } }
Simon's name does not appear. what do you think would be the solution? can you help me?
Last edited by DarkDeviL; 05-10-2020 at 19:06.
Reason: Restore to previous version.
|
|