GamerDeMTA Posted March 29, 2013 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?
DNL291 Posted March 29, 2013 Posted March 29, 2013 getPlayerMoney outputChatBox getPlayerPing Please do not PM me with scripting related question nor support, use the forums instead.
CaptainZ. Posted March 29, 2013 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
iPrestege Posted March 29, 2013 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 (;
GamerDeMTA Posted April 6, 2013 Author 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?
Vision Posted April 6, 2013 Posted April 6, 2013 addEventHandler ( "onPlayerChat", root, function ( message ) if ( message == "showping" ) then outputChatBox ( getPlayerPing ( source ), source ) cancelEvent ( ) end end )
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