Jump to content

[Solved]


Recommended Posts

Posted (edited)

Hello guys, can somebody see what's wrong here?

attempt to call global 'getPlayerIP' (a nil value)

SOLVED

Edited by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted (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 by Guest

  

Posted

I get "IP: false" in the label

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

attempt to concatenate a boolean value

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted (edited)

SOLVED

Edited by Guest

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

  • Moderators
Posted

Maybe you should send the player name too?

https://wiki.multitheftauto.com/wiki/TriggerServerEvent

triggerServerEvent ( string event, element theElement, [arguments...] ) 

triggerServerEvent("mute", player,playerName) 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

Thanks ILYAMA :)

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...