JR10 Posted July 1, 2011 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 1, 2011 Author Posted July 1, 2011 ooohhhh, ok I'll add it now. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 1, 2011 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 1, 2011 Author Posted July 1, 2011 it doesn't work My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 1, 2011 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. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 1, 2011 Author Posted July 1, 2011 what did I had to change? I looked at it. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 1, 2011 Posted July 1, 2011 Post it here and i will edit it, that's what you want right. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 1, 2011 Author 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. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Jaysds1 Posted July 1, 2011 Author 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) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 1, 2011 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) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 2, 2011 Author 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? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Jaysds1 Posted July 2, 2011 Author 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? My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 2, 2011 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) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
will briggs Posted July 2, 2011 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... Founder of SAUR - Founder/Owner of ARC RPG
Jaysds1 Posted July 3, 2011 Author Posted July 3, 2011 (edited) How do you send people there password or username to there Email? Edited July 3, 2011 by Guest My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
karlis Posted July 3, 2011 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 [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Castillo Posted July 3, 2011 Posted July 3, 2011 I would say you need to use callRemote (if it's possible to) and PHP knowledge. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Jaysds1 Posted July 3, 2011 Author Posted July 3, 2011 karlis, Were all friends here trying to help each other, come on, And Castillo Thanks. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
will briggs Posted July 3, 2011 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? Founder of SAUR - Founder/Owner of ARC RPG
Jaysds1 Posted July 3, 2011 Author Posted July 3, 2011 Ya, most of my posts are those, but I sometimes help people out. My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 3, 2011 Posted July 3, 2011 It just that it's not really encouraging to help you when you say "I DON'T CARE ANYMORE!". Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 3, 2011 Author Posted July 3, 2011 Sorry then... My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
Jaysds1 Posted July 4, 2011 Author 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) My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
JR10 Posted July 4, 2011 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) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Jaysds1 Posted July 4, 2011 Author Posted July 4, 2011 Thanks JR10 My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
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