Jump to content

OnPlayerLogin help plz


TDK

Recommended Posts

Posted

hi all.. i need help with making onplayerjoin and onplayerlogin scripts..

onplayerjoin need to outputchatbox to the player,

onplayerlogin need to move player in team (only player with nicks: nick1 , nick2, nick3)... anybody have any ideas?? plz help..

i'm noob in lua scripting... and in eglish to)

Posted
local root = getRootElement()
addEventHandler("onPlayerLogin", root,
function()
outputChatBox(getPlayerName(source).."logged in group players", root)
end
)
function assignNewTeam ( source, commandName, teamName )
local theTeam = createTeam ( Players ) 
if theTeam then                          
setPlayerTeam ( source, theTeam )    
end
end
addEventHandler ( "onPlayerLogin", assignNewTeam )

--------

don't work, help pls..

and how to set nicknames to move into the team???

Posted
local root = getRootElement()
addEventHandler("onPlayerLogin", root,
function()
outputChatBox(getPlayerName(source).."logged in group players", root)
end
)
function assignNewTeam ( source, commandName, teamName )
local theTeam = createTeam ( Players ) 
if playerNick == "Player" , "Newbie" , "Lildog" then
setPlayerTeam ( source, theTeam ) 
end
end
addEventHandler ( "onPlayerLogin", assignNewTeam )

Posted
DEBUG Mod don't help me(( maybe you can write an example plz?

lies..

im pretty sure that this:

createTeam ( Players )

will trigger error..

your code is totally mess, and you should get back to basics, and stop requesting scripts after just merging few examples from wiki :/

Posted
DEBUG Mod don't help me(( maybe you can write an example plz?

lies..

im pretty sure that this:

createTeam ( Players )

will trigger error..

your code is totally mess, and you should get back to basics, and stop requesting scripts after just merging few examples from wiki :/

not lies=D

?????

i know it((((

Posted

If you know it then fix it because debug window tells you what is wrong with your script and you can fix it easily after reading the message.

Posted
If you know it then fix it because debug window tells you what is wrong with your script and you can fix it easily after reading the message.

i'm a full n00b, but: how to activate debug mod and can you write move to the team script example???

Posted
THX FOR WIKI =D

o_O I LOVE YOU 50p!!!! THX MAN!!!!!

... Theme closed=D

This link was in first reply by 50p.. -.-

and what?? lamerXD

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...