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?

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

That function will trigger onPlayerLogin, I don't see what's the problem.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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) 

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

That's a highly inefficient code.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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)

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

That script will create 1 blip every render.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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