-.Paradox.- Posted March 31, 2014 Share Posted March 31, 2014 (edited) Hello guys, can somebody see what's wrong here? attempt to call global 'getPlayerIP' (a nil value) SOLVED Edited March 31, 2014 by Guest Link to comment
Weii. Posted March 31, 2014 Share Posted March 31, 2014 getPlayerIP is server side only! Link to comment
iPrestege Posted March 31, 2014 Share Posted March 31, 2014 Use Data to sync the IP in the client. Link to comment
iPrestege Posted March 31, 2014 Share Posted March 31, 2014 (edited) -- Client Side local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1],row,column ) local player = getPlayerFromName ( playerName ) guiSetText ( GUIEditor.label[3],'IP: '.. getElementData ( player,'iPlayerIP' ) ) -- Server Side addEventHandler ( 'onPlayerJoin',root, function ( ) setElementData ( source,'iPlayerIP',getPlayerIP ( source ) ) end ) Edited March 31, 2014 by Guest Link to comment
-.Paradox.- Posted March 31, 2014 Author Share Posted March 31, 2014 I get "IP: false" in the label Link to comment
iPrestege Posted March 31, 2014 Share Posted March 31, 2014 Copy again and make sure player returning for a player and please use /debugscript 3 , Thanks. Link to comment
-.Paradox.- Posted March 31, 2014 Author Share Posted March 31, 2014 attempt to concatenate a boolean value Link to comment
iPrestege Posted March 31, 2014 Share Posted March 31, 2014 Have you left and join again? Link to comment
-.Paradox.- Posted March 31, 2014 Author Share Posted March 31, 2014 (edited) SOLVED Edited March 31, 2014 by Guest Link to comment
Moderators IIYAMA Posted March 31, 2014 Moderators Share Posted March 31, 2014 Maybe you should send the player name too? https://wiki.multitheftauto.com/wiki/TriggerServerEvent triggerServerEvent ( string event, element theElement, [arguments...] ) triggerServerEvent("mute", player,playerName) 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