Jump to content

proracer

Members
  • Posts

    499
  • Joined

  • Last visited

Everything posted by proracer

  1. Okay I'm trying to test when someone enters server with nick: "Player" it sets random nick from: "Player1 to "Player1000". But it doesn't work with too many errors. function randomPlayerNick() local joinedPlayerName = getPlayerName (source) local newPlayerName = math.random (Player1, Player1000) if getPlayerName == "Player" then do setPlayerName ( thePlayer, newPlayerName ) elseif getPlayerName ~== "Player" then return end end addEventHandler ( "onPlayerJoin", getRootElement(), randomPlayerNick) Im using MTA Script Editor so it's easier to find errors.One error is that I need to end "do" statement and with "end" but I don't know how.Every time I put "end" somewhere it closes statement "if".Just too many errors, please any help will be appreciated. Still learning.
  2. Use functions: createMarker and setElementVelocity .If I'm not wrong.
  3. Thanks for all the help.Couldn't manage with that messed up GUI Window so I made new one.It works now thanks very much
  4. Sorry for interupting.Thank you for helping, this is what it came. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(458,280,559,661,"",false) guiSetAlpha(GUIEditor_Window[1],0) GUIEditor_Memo[1] = guiCreateMemo(420,-15181,77,1080,"",false,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Memo[1],1) guiWindowSetMovable( GUIEditor_Window[1], false ) guiWindowSetSizable( GUIEditor_Window[1], false ) SHC_Testing_Server_Rules = guiCreateWindow(444,238,681,671,"SHC Testing Server Rules 0.1 v",false) Player_Rules_Label = guiCreateLabel(109,87,157,58,"Player Rules",false,SHC_Testing_Server_Rules) guiLabelSetColor(Player_Rules_Label,0,255,0) guiLabelSetVerticalAlign(Player_Rules_Label,"top") guiLabelSetHorizontalAlign(Player_Rules_Label,"left",false) guiSetFont(Player_Rules_Label,"default-bold-small") Player_Rules_Memo = guiCreateMemo(25,105,315,401,"1. Be nice to admins and don't interrupt their work.\n\n2. Do not swear or spam because that will result in a KICK.If you do it several times it will result in a BAN!\n\n3. Do not CHEAT / HACK or use any other 3rd party software because that will result in a INSTANT BAN!\n\n4. If you are experienced in scripting you can freely ask our admins and maybe they let you work.\n\n5. Have fun!",false,SHC_Testing_Server_Rules) Member_Rules_Memo = guiCreateMemo(357,108,315,397,"1. Be nice to players and respect them.\n\n2. In this server you can test your new Resources/Scripts.\n\n3.If some player is asking for help in scripting you can help him but its your choice.\n\n4. As a Member you also must respect Player Rules.\n\n\n5. Have fun!",false,SHC_Testing_Server_Rules) Member_Rules_Label = guiCreateLabel(442,88,105,64,"Member Rules",false,SHC_Testing_Server_Rules) guiLabelSetColor(Member_Rules_Label,0,0,255) guiLabelSetVerticalAlign(Member_Rules_Label,"top") guiLabelSetHorizontalAlign(Member_Rules_Label,"left",false) guiSetFont(Member_Rules_Label,"default-bold-small") GUIEditor_Label[1] = guiCreateLabel(165,38,369,22,"This is a newly created server so this will be constantly updated!",false,SHC_Testing_Server_Rules) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) MTA_Image = guiCreateStaticImage(264,529,163,106,"images/mtalogo.png",false,SHC_Testing_Server_Rules) I_accept_rules_Button = guiCreateButton(16,556,238,69,"I accept rules!",false,SHC_Testing_Server_Rules) I_dont_accept_rules = guiCreateButton(430,554,242,71,"I dont accept rules!",false,SHC_Testing_Server_Rules) addEventHandler("onClientGUIClick", I_accept_rules_Button, acceptRules, false) end ) function acceptRules(button) if button == "left" then guiSetVisible( GUIEditor_Window[1], false) showCursor(false,false) outputChatBox("Thank you for accepting our rules.Have fun!") end end But... When I click the button it outputs the message correctly and it removes cursor but it doesn't close the window. What is the problem? Not only that... it doesn't even show the image which it should.
  5. Hi guys.I have been trying to script a little bit, starting off with creating Rules Window using simple GUI Editor. I came up with this codes. addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} showCursor(true,true) GUIEditor_Window[1] = guiCreateWindow(458,280,559,661,"",false) guiSetAlpha(GUIEditor_Window[1],0) GUIEditor_Memo[1] = guiCreateMemo(420,-15181,77,1080,"",false,GUIEditor_Window[1]) guiSetAlpha(GUIEditor_Memo[1],1) guiWindowSetMovable( GUIEditor_Window[1], false ) guiWindowSetSizable( GUIEditor_Window[1], false ) SHC_Testing_Server_Rules = guiCreateWindow(444,238,681,671,"SHC Testing Server Rules 0.1 v",false) Player_Rules_Label = guiCreateLabel(109,87,157,58,"Player Rules",false,SHC_Testing_Server_Rules) guiLabelSetColor(Player_Rules_Label,0,255,0) guiLabelSetVerticalAlign(Player_Rules_Label,"top") guiLabelSetHorizontalAlign(Player_Rules_Label,"left",false) guiSetFont(Player_Rules_Label,"default-bold-small") Player_Rules_Memo = guiCreateMemo(25,105,315,401,"1. Be nice to admins and don't interrupt their work.\n\n2. Do not swear or spam because that will result in a KICK.If you do it several times it will result in a BAN!\n\n3. Do not CHEAT / HACK or use any other 3rd party software because that will result in a INSTANT BAN!\n\n4. If you are experienced in scripting you can freely ask our admins and maybe they let you work.\n\n5. Have fun!",false,SHC_Testing_Server_Rules) Member_Rules_Memo = guiCreateMemo(357,108,315,397,"1. Be nice to players and respect them.\n\n2. In this server you can test your new Resources/Scripts.\n\n3.If some player is asking for help in scripting you can help him but its your choice.\n\n4. As a Member you also must respect Player Rules.\n\n\n5. Have fun!",false,SHC_Testing_Server_Rules) Member_Rules_Label = guiCreateLabel(442,88,105,64,"Member Rules",false,SHC_Testing_Server_Rules) guiLabelSetColor(Member_Rules_Label,0,0,255) guiLabelSetVerticalAlign(Member_Rules_Label,"top") guiLabelSetHorizontalAlign(Member_Rules_Label,"left",false) guiSetFont(Member_Rules_Label,"default-bold-small") GUIEditor_Label[1] = guiCreateLabel(165,38,369,22,"This is a newly created server so this will be constantly updated!",false,SHC_Testing_Server_Rules) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) MTA_Image = guiCreateStaticImage(264,529,163,106,"images/mtalogo.png",false,SHC_Testing_Server_Rules) I_accept_rules_Button = guiCreateButton(16,556,238,69,"I accept rules!",false,SHC_Testing_Server_Rules) GUIEditor_Button[1] = guiCreateButton(430,554,242,71,"I dont accept rules!",false,SHC_Testing_Server_Rules) end ) addEventHandler("onClientGUIClick", I_accept_rules_Button, acceptRules, false) function acceptRules(button,state) if button == "left" and state == "up" then guiSetVisible( GUIEditor_Window[1], false) showCursor(false,false) outputChatBox("Thank you for accepting our rules.Have fun!") end end The GUI window shows up but when I press accept rules it does really nothing! Please if you can help me I'm a newb.
  6. I was wondering, if it's not hard for you to make filter for gamemode's such as Race,Deathmatch,Team deathmatch etc... Would be much easier.
  7. I started mapping..really big.It has about 500-600 objects but it started bugging.I have moving object script and it works but sometimes i can't delete some objects and can't add some objects. LoL. So i quit for some time and think what to do
  8. function resource_starts_0 () end addEventHandler ( "onClientResourceStart", getRootElement(), resource_starts_0 ) function resource_starts_1 () playSound ( "Brian Nrg - Suck My Ballz.mp3" ) end Is this ok? And yeah i copied from someone <.<
  9. Hey man you make cool maps , Im good at making maps too so if you have time you can add me on ICQ - 575955655, skype:pr0rac3r or msn: [email protected] and we can try make maps together..i dont suck
  10. Hey guys.I started to make DM map but DM with cars not guns, Race type but DM.I wanted to put song into the map and i think i must use: "playSound" function right? If is that correct i don't know what event i must trigger to play this because i searched events connected for when map starts or something but i found nothing.So my question is: Is is possible to play song and what event i must trigger to start it.. and it should be client event right? Sorry if im really annoying im not that pro in scripting but im good in mapping Plz help me if you can
  11. Lol you were right.I downloaded newest build (but probably i had that version so i just installed again lol) and it shows Creation Panel.It was just minor bug?
  12. Hey guys i have this fuckin issue and i don't know how to fix it.I downloaded MTA 1.0.4 RC and when i go in Map Editor it won't show the Creation Panel menu wtf.Look:
  13. Same for me.I had that problem and i figured it out that i need to convert it but it doesn't work because the co-ordinates the loop generator generates are for MTA:DM or idk?
  14. That are good news i hope he will make less buggy and add some new features
  15. I used it.Its damned buggy..if you have any other idea?
  16. Hi guys i have damn problem with loops creator for MTA:SA 1.0.3. I downloaded resource which is GUI based and i think its called 'loopgen' ... well i started it and that stuff..everything is fine and when i make loop i think i must convert it but it wont work.If i don't convert..well than next time i start map editor(restart map editor) it doesn't show any objects and i don't know why.Anyone knows solution or has tool for MTA:SA 1.0.3. and not for MTA:Race? Greetz
  17. I think he left this project long time ago.Just a thought
  18. You must login as administrator in MTA Map Editor.Please browse this thread little more to find answer
  19. Hi guys.I wanted to make new Infernus skin for my clan.But first i wanted to ask what script i must make to load modified files into the server so anyone can see.Example i found on internet Red nitro injection.How to make a script who can load the modified file(in this case effects.fxp) so everyone who is playing can use (see) the red nitro of their car and everyone else who is driving.My friend from other clan helped me with how to load modified infernus.dff and .txd.This is what he put that everyone can see the modified Infernus as a resource. addEventHandler("onClientResourceStart", getResourceRootElement(), function() txd = engineLoadTXD ( "infernus.txd" ) engineImportTXD ( txd, 411 ) dff = engineLoadDFF ( "infernus.dff", 411 ) engineReplaceModel ( dff, 411 ) end ) So from this example can i load the modified .fxp file too..? And how?
  20. No,It wont work.When i start in 'race' gamemode it just starts other map.But if i start in any other gamemode it is ok.I really can't understand.But i spot another error.When i exit editor i start it again and it fails to start.It says some Console error.I saw that MTA official site.It is fixed with i don't know what resource but maybe i don't know how to install resources.Before i had MTA Race v1.1.2 so i didn't had MTA DM that i know how to handle with resources.Please help me.I put new resources in: MTA San Andreas/server/mods/deathmatch/resources/. I just copy all resources into that folder and paste them over old resources. Why it doesn't work?
  21. Yeah.I tried that before won't work.It just say error loading editor_test.And than loads some map and whats even weirder it just has 1 cp .So any oter suggestions.Man i tried everything. EDIT: Ok,I'll make short vid.Just gimme 20 mins for placing on YouTube. EDIT2: So i was bored to make vid.I just make 1 picture.Ok look: Sorry for bad quality,but it says this: Gamemode 'Race' started. Map 'editor_test' started. (actually thats not my map's name ) Error loading map 'editor_test' Changing to random map in 5 seconds. Map 'Sea Hunter' started.
  22. Im sorry this is outdated.90% of MTA users are using MTA 1.0 . Go download it yourself Im sorry i can't help im not using MTA Race 1.1.2
×
×
  • Create New...