Jump to content

onPlayerLogin


Recommended Posts

Posted

Hey guys, i got a function to show my script gui after the login panel logins you, but apparently my script somehow only detects when using /login, althought the login panel does this:

  
logIn(source, account, password) 

Any idea how to fix this?

Posted

Aparently, it will not work if i've restarted the script, but if i've joined it works.. strange somehow :D

Anyways it doesnt bothers, im struck here, it always recognizes as if the player was in my team, no matter what.

  
unction RadarTeamBlips() 
for i, v in ipairs(getElementsByType("player")) do 
    if getPlayerTeam(v) == getPlayerTeam(getLocalPlayer()) then 
    createBlipAttachedTo(v, 62, 2, 0, 255, 0, 255, 0, 65535) 
    else 
    createBlipAttachedTo(v, 59, 2, 0, 255, 0, 255, 0, 65535) 
    end 
     
end 
end 
addEventHandler("onClientRender", getRootElement(), RadarTeamBlips) 

Posted
That's a highly inefficient code.

It might be, but its the easiest way atm. And somehow, after i reconnected, everyone is shown as not part of my team( even if my team)

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