Jump to content

Frugle

Members
  • Posts

    5
  • Joined

  • Last visited

Frugle's Achievements

Vic

Vic (3/54)

0

Reputation

  1. function joinHandler() local x = 244.0065612793 local y = 2507.7377929688 local z = 16.496959686279 spawnPlayer(source, x, y, z) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("Welcome to My Server", source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) function ClientChat(text) if ( text == "pos" ) then outputConsole( "SUCCESS" ) outputChatBox( "SUCCESS" ) else outputConsole( "FAILURE" ) outputChatBox( "FAILURE" ) end end addEventHandler ("onClientChatMessage", getRootElement(), ClientChat) I test it by typing pos to ingame chat. Typing something else doesn't output "FAILURE" too.
  2. I've tried everything but I can't get it to work.
  3. Thank you but it still doesn't work for some reason .
  4. function ClientChat(text) if ( text == "pos" ) then outputConsole ( "SUCCESS" ) outputChatBox ( "SUCCESS", getRootElement(), 255, 255, 255, true ) else outputConsole ( "FAILURE" ) outputChatBox ( "FAILURE", getRootElement(), 255, 255, 255, true ) end end addEventHandler ("OnClientChatMessage", getRootElement(), ClientChat) I am trying to output SUCCESS to chatbox and console if player types pos, but nothing happens Not even FAILURE output. Need help!
×
×
  • Create New...