JR10 Posted July 1, 2011 Share Posted July 1, 2011 Is that your server side?? first you must edit it to check if he is an admin and add it to onPlayerJoin local admins = {} addEventHandler('onPlayerJoin', root, function() --if the player is admin here table.insert(admins, v) --end end ) Now edit it and check if the player is admin. Link to comment
Jaysds1 Posted July 1, 2011 Author Share Posted July 1, 2011 ooohhhh, ok I'll add it now. Link to comment
JR10 Posted July 1, 2011 Share Posted July 1, 2011 Don't add it without editting it don't just copy paste if you looked at it you would have watched the comment edit it to check if the player is admin. Link to comment
JR10 Posted July 1, 2011 Share Posted July 1, 2011 Looks like again you just copied it and paste, you should edit it and you should look at the code someone is giving you. Link to comment
Jaysds1 Posted July 1, 2011 Author Share Posted July 1, 2011 what did I had to change? I looked at it. Link to comment
JR10 Posted July 1, 2011 Share Posted July 1, 2011 Post it here and i will edit it, that's what you want right. Link to comment
Jaysds1 Posted July 1, 2011 Author Share Posted July 1, 2011 NO, I just want to know how to do stuff like this, so when I create my new server I don't need help. Do you think I really want to be on here trying to figure out how to create scripts... i just want to learn and don't come back to this forum, thats all. Link to comment
Jaysds1 Posted July 1, 2011 Author Share Posted July 1, 2011 Is it possible that a person could spawn on a random team? Here is my script, server-side: addEvent("Random",true) addEventHandler("Random",getRootElement(), function() if (source) then setPlayerTeam" class="kw6">setPlayerTeam(source, math.random(teamB, teamS)) if (source) and (teamB) then spawnPlayer(source, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(source, true) setCameraTarget(source, source) elseif (source) and (teamS) then spawnPlayer(source, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(source, true) setCameraTarget(source, source) end end end) Link to comment
JR10 Posted July 1, 2011 Share Posted July 1, 2011 LOL math.random? and you are using it with teams variables? You could make a table with the teams like this local Teams = { [1] = 'First Team Name', [2] = 'Second Team Name' } addEvent("Random",true) addEventHandler("Random",getRootElement(), function() if (source) then local rand = math.random(1, 2) setPlayerTeam(source, getTeamFromName(Teams[rand])) if (source) and (Teams[rand]) then spawnPlayer(source, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(source, true) setCameraTarget(source, source) end end end) Link to comment
Jaysds1 Posted July 2, 2011 Author Share Posted July 2, 2011 I have a problem with this resource I created, When I start the resource it keeps kicking people out of the server and says that the client-side lua doesn't work. How do I make this resource work? Link to comment
Jaysds1 Posted July 2, 2011 Author Share Posted July 2, 2011 JR10 When the person is suppose to spawn it shows the sky\, the camera is not on the player... Do you know why? Link to comment
JR10 Posted July 2, 2011 Share Posted July 2, 2011 local Teams = { [1] = 'First Team Name', [2] = 'Second Team Name' } addEvent("Random",true) addEventHandler("Random",getRootElement(), function() if (source) then local rand = math.random(1, 2) if getTeamFromName(Teams[rand]) then setPlayerTeam(source, getTeamFromName(Teams[rand])) spawnPlayer(source, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(source, true) setCameraTarget(source, source) end end end) Link to comment
will briggs Posted July 2, 2011 Share Posted July 2, 2011 BTW, dont double post, and i think your pissing everyone off with your non sense questions, Attitude and your demanding mind set... Link to comment
Jaysds1 Posted July 3, 2011 Author Share Posted July 3, 2011 (edited) How do you send people there password or username to there Email? Edited July 3, 2011 by Guest Link to comment
karlis Posted July 3, 2011 Share Posted July 3, 2011 (edited) How do you send people there password or username to there Email? I DON'T CARE ANYMORE! EDIT: as he edited the post, just fyi, this is reference for him saying the same thing when we say his attitude is bad. Edited July 4, 2011 by Guest Link to comment
Castillo Posted July 3, 2011 Share Posted July 3, 2011 I would say you need to use callRemote (if it's possible to) and PHP knowledge. Link to comment
Jaysds1 Posted July 3, 2011 Author Share Posted July 3, 2011 karlis, Were all friends here trying to help each other, come on, And Castillo Thanks. Link to comment
will briggs Posted July 3, 2011 Share Posted July 3, 2011 karlis, Were all friends here trying to help each other, come on,And Castillo Thanks. LOL??? You dont help anyone? You just give answers like LOL? or YA ill send ya? Link to comment
Jaysds1 Posted July 3, 2011 Author Share Posted July 3, 2011 Ya, most of my posts are those, but I sometimes help people out. Link to comment
JR10 Posted July 3, 2011 Share Posted July 3, 2011 It just that it's not really encouraging to help you when you say "I DON'T CARE ANYMORE!". Link to comment
Jaysds1 Posted July 4, 2011 Author Share Posted July 4, 2011 When a player press Start Match it's suppose to spawnPlayer but the debugscript says that there is a bad Argument, but there isn't a bad argument, plus the random team script that JR10 gave me doesn't work. Server-side only: local Teams = { [1] = 'Black OPS', [2] = 'Spetsnaz', [3] = 'SOG', [4] = 'NVA', [5] = 'Tropas', [6] = 'OP40' } addEvent("Random",true) addEventHandler("Random",getRootElement(), function() if (client) then local rand = math.random(1, 2, 3, 4, 5, 6) setPlayerTeam(client, getTeamFromName(Teams[rand])) if (client) and (Teams[rand]) then spawnPlayer(client, x, y, z, 0, math.random(0,288),0, 0) fadeCamera(client, true) setCameraTarget(client, client) end end end) Link to comment
JR10 Posted July 4, 2011 Share Posted July 4, 2011 Don't double post, use "EDIT". And you edited my script wrong. here: local Teams = { [1] = 'Black OPS', [2] = 'Spetsnaz', [3] = 'SOG', [4] = 'NVA', [5] = 'Tropas', [6] = 'OP40' } addEvent("Random",true) addEventHandler("Random",getRootElement(), function() if (client) then local rand = math.random(1, 6) if (getTeamFromName(Teams[rand])) then spawnPlayer(client, x, y, z, 0, math.random(0,288),0, 0, getTeamFromName(Teams[rand])) fadeCamera(client, true) setCameraTarget(client, client) end end end) 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