loler Posted June 3, 2010 Share Posted June 3, 2010 Hey i made a buy panel with 2 thinks in + but it didnt works I dont make it public Now what i need is to know whats the haystacks id Link to comment
Xierra Posted June 3, 2010 Share Posted June 3, 2010 Haystack... If you're using MTA SA Map editor, just search "hay", if you find it, look (or scroll to the side) and see the object ID. Unfortunately, sorry, I forgot the ID. Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 Ok but when i go to MTA mapeditor it gives:Error downloading requestet files.Failed to initialize the download. Can anyone help me????? please Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 (edited) Client side: --Closed Server side: --Closed Edited June 3, 2010 by Guest Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 When i write in console debugscript 3 it didnt gives errors Link to comment
Dark Dragon Posted June 3, 2010 Share Posted June 3, 2010 could you tell us what doesn't work? how far can you get? Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 Ok i editet it a bit and now it works btw when i press a server or when i go to my server it gives the same error Why? the bug was i was using source not player local x,y,z = getElementPosition( player ) i didnt let it more public Link to comment
NotAvailable Posted June 3, 2010 Share Posted June 3, 2010 Ok but when i go to MTA mapeditor it gives:Error downloading requestet files.Failed to initialize the download.Can anyone help me????? please Make sure you ZIPPED it (The map editor files) Link to comment
Xierra Posted June 3, 2010 Share Posted June 3, 2010 Lol, I can't have a chance to look at the code (Also don't make posts like that, edit it instead of making a new post. You did a quadruple post or 4x posts) Why you keep it secret? I never hide my script. Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 Ok but when i go to MTA mapeditor it gives:Error downloading requestet files.Failed to initialize the download.Can anyone help me????? please Make sure you ZIPPED it (The map editor files) On ALL SERVERS gives so and im SURE that i zipped it and XX3 i hide it cuz than i make another work btw when you want it PM me andi will give it to you Link to comment
50p Posted June 3, 2010 Share Posted June 3, 2010 ...and XX3 i hide it cuz than i make another work btw when you want it PM me andi will give it to you LOL, You want us to help you without showing code and you want people to PM you if they want to help you? Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 i found the bug say me somethink why should i keep it to be public?? that means that i make another work.So now who want it (it is working) must PM me Link to comment
dzek (varez) Posted June 3, 2010 Share Posted June 3, 2010 one thing.. are "loler" just another account of kevin11/COOKIE2 or his "friends" ? Could any mod confirm/decline it (register IP subnet)? - Asking WEIRD questions - Editing posts in strange way (after someone's reply) - Multi-posting Probably he created new acc just to hide that it's he again, and the code he has is stolen from somewhere Link to comment
Xierra Posted June 3, 2010 Share Posted June 3, 2010 (edited) Nah, some peoples may have similar personalities, you know. He was just not perfect at English. Just don't be so sensitive for now, varez. Just watch him for now if you feel he's suspicious. @loler: You know, it's better to show everyone your scripts, because some peoples here are ready to help you. Just don't keep it secret. Edited June 3, 2010 by Guest Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 (edited) Nope , i am another person from MTA not COOKIE/kevin11 So now i have a another problem: When i click on haystack or on ramp or on barrel it appears in console: [16:40:33] ERROR: Client triggered serverside event barrel, but event is not added serverside Here is my script: Client side: GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(161,102,390,342,"Buy window by loler",false) GUIEditor_Button[1] = guiCreateButton(31,25,90,18,"Buy nitro",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(30,46,91,17,"Buy repair",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(30,67,91,17,"Buy haystack",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(30,86,91,17,"Buy barrel",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(30,100,91,17,"Buy ramp",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) function guiToggleVisible ( ) if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible(GUIEditor_Window[1], false) showCursor ( false ) else guiSetVisible(GUIEditor_Window[1], true) showCursor ( true ) end end bindKey ( "M", "down", guiToggleVisible ) function fixv() triggerServerEvent("fixRequest", getLocalPlayer()) end addEventHandler("onClientGUIClick",GUIEditor_Button[2],fixv,false) function nitro() triggerServerEvent("nitro", getLocalPlayer()) end addEventHandler("onClientGUIClick",GUIEditor_Button[1],nitro,false) function haystack() triggerServerEvent("haystack", getLocalPlayer()) end addEventHandler("onClientGUIClick",GUIEditor_Button[3],haystack,false) function barrel() triggerServerEvent("barrel", getLocalPlayer()) end addEventHandler("onClientGUIClick",GUIEditor_Button[4],barrel,false) function ramp() triggerServerEvent("ramp", getLocalPlayer()) end addEventHandler("onClientGUIClick",GUIEditor_Button[5],barrel,false) Server side: addEvent("nitro", true) addEventHandler("nitro", getRootElement(), function() if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 7000 ) then takePlayerMoney(source, 7000) addVehicleUpgrade(getPedOccupiedVehicle(source),1010) outputChatBox("Nitro Successfully added", source, 255, 255, 0, true) else outputChatBox("Not enough money.", source, 255, 0, 0, true) end else outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) end end ) addEvent("fixRequest", true) addEventHandler("fixRequest", getRootElement(), function() if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 20000 ) then takePlayerMoney(source, 20000) fixVehicle(getPedOccupiedVehicle(source)) outputChatBox("Vehicle Successfully Fixed", source, 255, 255, 0, true) else outputChatBox("Not enough money.", source, 255, 0, 0, true) end else outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) end end ) addEvent("haystack", true) addEventHandler("haystack", getRootElement(), function() local x,y,z = getElementPosition( player ) if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 99999 ) then takePlayerMoney(source, 99999) createObject ( 3374 , x , y , z ) outputChatBox("Haystack Successfully planted", source, 255, 255, 0, true) else outputChatBox("Not enough money.", source, 255, 0, 0, true) end else outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) end end ) addEvent("barrel", true) addEventHandler("barrel", getRootElement(), function() local x,y,z = getElementPosition( player ) if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 100000 ) then takePlayerMoney(source, 100000) createObject ( 1225 , x , y , z ) outputChatBox("Barrel Successfully planted", source, 255, 255, 0, true) else outputChatBox("Not enough money.", source, 255, 0, 0, true) end else outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) end end ) addEvent ("ramp" , true) addEventHandler("ramp", getRootElement(), function() local x,y,z = getElementPosition( player ) if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 100000 ) then takePlayerMoney(source, 100000) createObject ( 1632 , x + 5 , y , z ) outputChatBox("Ramp Successfully planted", source, 255, 255, 0, true) else outputChatBox("Not enough money.", source, 255, 0, 0, true) end else outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) end end ) Edited June 3, 2010 by Guest Link to comment
dzek (varez) Posted June 3, 2010 Share Posted June 3, 2010 you forgot about addEvent for few custom events.. First two are ok, rest do not have addEvent Link to comment
loler Posted June 3, 2010 Author Share Posted June 3, 2010 Thank you but now it gives : [18:06:48] WARNING: server.lua: Bad argument @ 'getElementPosition' - Line: 56 [18:06:48] WARNING: server.lua: Bad argument @ 'createObject' - Line: 60 Link to comment
50p Posted June 3, 2010 Share Posted June 3, 2010 For getElementPosition use source since you triggerServerEvent with player element as source. Link to comment
kevin11 Posted June 3, 2010 Share Posted June 3, 2010 wow? im not asking for this because its posted 2 days ago nah joking please stfu? i can make a gui with simple buy objects... Link to comment
kevin11 Posted June 3, 2010 Share Posted June 3, 2010 one thing..are "loler" just another account of kevin11/COOKIE2 or his "friends" ? Could any mod confirm/decline it (register IP subnet)? - Asking WEIRD questions - Editing posts in strange way (after someone's reply) - Multi-posting Probably he created new acc just to hide that it's he again, and the code he has is stolen from somewhere youre fucking retard u know that?? i dont steal Link to comment
robhol Posted June 3, 2010 Share Posted June 3, 2010 Can't you just calm your presumably maximum 11 year old ass down a notch or 50, and then shut up unless you know what you're talking about. (Although I guess that means you won't have any further use for your keyboard whatsoever...) Link to comment
dzek (varez) Posted June 4, 2010 Share Posted June 4, 2010 had your birthday already this year? Happy bday then, you are 12 now ;D Sorry for OT. I had to Link to comment
loler Posted June 4, 2010 Author Share Posted June 4, 2010 Can anyone help me? When i want to join to a server it gives: Error downloading requested files.Failed to initialize download. Can anyone help me?? please 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