TDK Posted August 2, 2010 Posted August 2, 2010 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) Fresh Russian Server! Fresh every day=D
dzek (varez) Posted August 2, 2010 Posted August 2, 2010 just read examples in wiki? like this one https://wiki.multitheftauto.com/wiki/OnPlayerLogin Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
TDK Posted August 3, 2010 Author Posted August 3, 2010 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??? Fresh Russian Server! Fresh every day=D
TDK Posted August 3, 2010 Author Posted August 3, 2010 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 ) Fresh Russian Server! Fresh every day=D
TDK Posted August 3, 2010 Author Posted August 3, 2010 anybody help plz=( Fresh Russian Server! Fresh every day=D
50p Posted August 3, 2010 Posted August 3, 2010 DO NOT TRIPLE POST! Use the damn debug window.. You have many errors in such a short script. https://wiki.multitheftauto.com/wiki/Debugging - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
TDK Posted August 3, 2010 Author Posted August 3, 2010 DO NOT TRIPLE POST!Use the damn debug window.. You have many errors in such a short script. https://wiki.multitheftauto.com/wiki/Debugging DEBUG Mod don't help me(( maybe you can write an example plz? Fresh Russian Server! Fresh every day=D
dzek (varez) Posted August 3, 2010 Posted August 3, 2010 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
TDK Posted August 3, 2010 Author Posted August 3, 2010 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(((( Fresh Russian Server! Fresh every day=D
50p Posted August 3, 2010 Posted August 3, 2010 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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
TDK Posted August 3, 2010 Author Posted August 3, 2010 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??? Fresh Russian Server! Fresh every day=D
50p Posted August 4, 2010 Posted August 4, 2010 You have to learn to debug your scripts because this is the most important thing you need to learn before you start scripting something serious or more advanced: https://wiki.multitheftauto.com/wiki/Debugging And about the teams, I think this may help you: https://community.multitheftauto.com/index.html?p ... ils&id=612 - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
TDK Posted August 4, 2010 Author Posted August 4, 2010 You have to learn to debug your scripts because this is the most important thing you need to learn before you start scripting something serious or more advanced:https://wiki.multitheftauto.com/wiki/Debugging And about the teams, I think this may help you: https://community.multitheftauto.com/index.html?p ... ils&id=612 THX FOR WIKI =D o_O I LOVE YOU 50p!!!! THX MAN!!!!! ... Theme closed=D Fresh Russian Server! Fresh every day=D
dzek (varez) Posted August 4, 2010 Posted August 4, 2010 THX FOR WIKI =Do_O I LOVE YOU 50p!!!! THX MAN!!!!! ... Theme closed=D This link was in first reply by 50p.. -.- Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
TDK Posted August 9, 2010 Author Posted August 9, 2010 THX FOR WIKI =Do_O I LOVE YOU 50p!!!! THX MAN!!!!! ... Theme closed=D This link was in first reply by 50p.. -.- and what?? lamerXD Fresh Russian Server! Fresh every day=D
dzek (varez) Posted August 10, 2010 Posted August 10, 2010 Just read carefully. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Recommended Posts