Tete omar Posted August 3, 2012 Posted August 3, 2012 function onTheGround ( player ) local hisIP = getPlayerIP( player ) local hisAccountName = getAccountName ( getPlayerAccount( player ) ) triggerClientEvent ( player, "hisIPandhisaccount", player, hisIP, hisAccountName ) end addEventHandler("onResourceStart", resourceRoot, onTheGround) Debug Errors : Bad argument @ 'getPlayerIP' [Expected element at argument 1, got resource-data] Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got resource-data] Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] I doubt that player element is the wrong
TAPL Posted August 3, 2012 Posted August 3, 2012 function onTheGround() for i, player in pairs(getElementsByType("player")) do local hisIP = getPlayerIP(player) local hisAccountName = getAccountName(getPlayerAccount(player)) triggerClientEvent(player, "hisIPandhisaccount", player, hisIP, hisAccountName) end end addEventHandler("onResourceStart", resourceRoot, onTheGround) onResourceStart does not have player parameter. Edit: you will still will have problem You need to use setElementData. and with event onPlayerJoin
Tete omar Posted August 3, 2012 Author Posted August 3, 2012 I'm trying to create a new admin panel onPlayerJoin isn't fit for that i guess.
MIKI785 Posted August 3, 2012 Posted August 3, 2012 You should use onPlayerLogin... onResourceStart is not suitable for this as it will be triggered only when the resource is started.
ernst Posted August 3, 2012 Posted August 3, 2012 Or, just do as I did, make it an event and trigge it from client when you click on a player (assuming you will use a gridlist for players)
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