^Dev-PoinT^ Posted November 13, 2011 Share Posted November 13, 2011 Hi i have problem with Trigring see client triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),) server addEvent ( "onPlayerChooseTeam" , true ) addEventHandler ( "onPlayerChooseTeam" , root , function ( teamName ) local team = getTeamFromName ( teamName ) setPlayerTeam ( source , team ) outputChatBox("You have successfully choosed "..getTeamName(team).." team.", resPlayer, root, 255, 255, 0) end ) Link to comment
TAPL Posted November 13, 2011 Share Posted November 13, 2011 triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),) should be triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),teamName) ------------------------------------------------ outputChatBox("You have successfully choosed "..getTeamName(team).." team.", resPlayer, root, 255, 255, 0) should be outputChatBox("You have successfully choosed "..getTeamName(team).." team.", source, 255, 255, 0) Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 --------- bad argument @ 'getTeamFromName, bad argument @ 'getTeamName,@ ------- Link to comment
Charlie_Jefferson Posted November 13, 2011 Share Posted November 13, 2011 local playerTeam = getPlayerTeam ( source ) Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 this is the code only i stop on this Link to comment
TAPL Posted November 13, 2011 Share Posted November 13, 2011 what? as i see your code should send an team name string to server side i think you're not who made this code Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 i swear i made it Link to comment
12p Posted November 13, 2011 Share Posted November 13, 2011 Dev. I know you don't know scripting. But also you are not an idiot. Think about your script. Think your next step. Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 (edited) i just Made this now function me () local team = getPlayerTeam ( source ) if ( team ) then triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),teamName) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), me ) Edited November 13, 2011 by Guest Link to comment
12p Posted November 13, 2011 Share Posted November 13, 2011 What does your script "do"? Just look at it. Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 when i spawn it say what team i moved To Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 Please Help day by day mybe i well get Better Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 so what i do for the next step ? Link to comment
TAPL Posted November 13, 2011 Share Posted November 13, 2011 function me () if (source ~= getLocalPlayer()) then return end local team = getPlayerTeam ( source ) if ( team ) then local teamName = getTeamName(team) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(),teamName) end end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), me ) Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 no erros and dont work Link to comment
TAPL Posted November 13, 2011 Share Posted November 13, 2011 what? LOL! LOL! LOL! LOL! LOL! LOL! LOL! LOL! i think you don't know how to test your script LOL!LOL!LOL!LOL!LOL!LOL!LOL!LOL!LOL!LOL! also i don't see a point to trigger to server just this client Side function me () if (source ~= getLocalPlayer()) then return end local team = getPlayerTeam ( source ) if ( team ) then outputChatBox("You have successfully choosed "..getTeamName(team).." team.", 255, 255, 0) end end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), me ) and Done Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 it didnt work but Thx any way Solved i alredy have one but white color Link to comment
TAPL Posted November 13, 2011 Share Posted November 13, 2011 i've Tested What I post Here and Work With Yellow Color You have successfully choosed Red team. Link to comment
^Dev-PoinT^ Posted November 13, 2011 Author Share Posted November 13, 2011 tapl you remember my topic about RedTeam and Blue Team is this can work with and is it effects on this? Link to comment
TAPL Posted November 14, 2011 Share Posted November 14, 2011 Please explain what you want to do Link to comment
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