Jump to content

Problem with "getPlayerIP"


Recommended Posts

آلسلام عليكم ,

أخوآني أنا عندي لوحة و وضعت معلومات الليبل من إسم اللاعب واسم السيرفر ... إلخ

لكن عندي مشكلة في الأي بي

لمآ أحطه يقول :

Bad argument @ 'getPlayerIP'

و هذهـ الأكواد لو فيهآ أخطاء يَ ليت تعلموني ..

Client side:

triggerServerEvent("ip",localPlayer) 
addEvent("ip",true) 
addEventHandler("ip",root, 
    function(ip) 
        guiSetText (GUIEditor_Label[16] , "".. tostring(ip))     
    end 
) 

Server side:

addEvent("ip",true) 
function ip(thePlayer) 
    local IP = getPlayerIP(thePlayer) 
    triggerClientEvent(source,"ip", source,IP) 
end 
addEventHandler("ip",root,ip) 

argument و يَ ليت أحد يشرح لي وش المقصد من

:fadein: و شكراً لكم مقدماً

Link to comment
triggerServerEvent("ip",localPlayer) 
addEvent("ip",true) 
addEventHandler("ip",root, 
    function(ip) 
        guiSetText(GUIEditor_Label[16],tostring(ip))    
    end 
) 

addEvent("ip",true) 
function ip() 
    local IP = getPlayerIP(source) 
    triggerClientEvent(source,"ip", source,IP) 
end 
addEventHandler("ip",root,ip) 

Link to comment
Thnx TAPL ,

but what is the meaning of " Bad argument " ?

Bad argument means incorrect argument

arguments is what you put inside the brackets ( )

local IP = getPlayerIP(thePlayer) 

thePlayer is Bad argument which this means the argument (thePlayer) is not defined.

Link to comment

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...