GamerDeMTA Posted March 29, 2013 Share Posted March 29, 2013 I wanna do a outputhctabox who says "Your money is (the money of the player)" How to do it? Can you give an example? Also... there are functions to... _Ping of the player? Link to comment
DNL291 Posted March 29, 2013 Share Posted March 29, 2013 getPlayerMoney outputChatBox getPlayerPing Link to comment
CaptainZ. Posted March 29, 2013 Share Posted March 29, 2013 Money getPlayerMoney outputChatBox Ping getPlayerPing outputChatBox About money -You asked for example ; https://wiki.multitheftauto.com/wiki/GetPlayerMoney this is something very similiar Link to comment
iPrestege Posted March 29, 2013 Share Posted March 29, 2013 -- Server Side -- addEventHandler("onPlayerCommand",root, function ( theCmd ) if ( theCmd == "Money" ) then outputChatBox(" You're Money : ("..getPlayerMoney( source )..") !!!",source,0,255,0,true); elseif ( theCmd == "Ping" ) then outputChatBox(" You're Ping : ("..getPlayerPing( source )..") !!!",source,255,255,0,true); end end ); How does it work? just type the command "Money" or the command "Ping" in the console and will work try it server sid (; Link to comment
GamerDeMTA Posted April 6, 2013 Author Share Posted April 6, 2013 -- Server Side -- addEventHandler("onPlayerCommand",root, function ( theCmd ) if ( theCmd == "Money" ) then outputChatBox(" You're Money : ("..getPlayerMoney( source )..") !!!",source,0,255,0,true); elseif ( theCmd == "Ping" ) then outputChatBox(" You're Ping : ("..getPlayerPing( source )..") !!!",source,255,255,0,true); end end ); How does it work? just type the command "Money" or the command "Ping" in the console and will work try it server sid (; And if I want to put it if a player says a message like "showping" instead a command? Link to comment
Vision Posted April 6, 2013 Share Posted April 6, 2013 addEventHandler ( "onPlayerChat", root, function ( message ) if ( message == "showping" ) then outputChatBox ( getPlayerPing ( source ), source ) cancelEvent ( ) end end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now