Jump to content

nickname = account name


synskidz

Recommended Posts

Posted

-- i want to know about michael99's resource known "m-nickname". i really need help

 

function setPlayerName (thePlayer)
acc = getPlayerAccount(thePlayer)
user = getAccountName(acc)
if user then
setPlayerName(thePlayer,user)
end
end
addEventHandler("onPlayerLogin",getRootElement(),setPlayerName)

  • Castillo locked and unlocked this topic
Posted (edited)
49 minutes ago, synskidz said:

yeah but its not working, where's the mistake?

Hi your mistake is that you are using thePlayer but the player in this event is the source.

Edited by iPrestege
Posted (edited)

This not work because you using a setPlayerName function - function is created already by mta, change function name.

 

Edited by Tasumi
  • Like 1
Posted
14 hours ago, Default said:

Try this 


addEventHandler ( "onPlayerLogin" , root , function ( _ , account )
setPlayerName ( source ,  getAccountName ( account ) )
end );

 

thanks dude... its work :D:D:D

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