Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

Anyone been able to display a message from a hook? I seen to be having issue with it. I get no errors, but I get no display message either

global $html, $page;
  
  $page->buildElement("success", array("text" =>  " tezzzeszzzz."));

Nothing =(

 

I also tried playing with the templating hook a bit and couldn't seem to do it

https://github.com/ChristopherDay/Gangster-Legends-V2/wiki/Hooks.templating

 

 

Edited by Sim
Posted
57 minutes ago, Tom V said:

Is this what you're looking for?

$this->alerts[] = $this->page->buildElement("success", array("text" => $text));

I know of that. They dontb display when adding the code in hooks. 

That one doesn't work either @ags_cs4

Posted

Sounds like you need to work out what context you need, $this will be different when you’re inside a closure, you most likely need to import something using globals 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...