loler
Members-
Posts
73 -
Joined
-
Last visited
Everything posted by loler
-
Im not expert but you dont need to put this in maps section?
-
I want to can not enter the server, but version 1.0.3
loler replied to Saudi Server's topic in Scripting
lol google transaltor SUCKS BADLY!!!! -
Hello guys , i have a problem When i want to join a server it gives : Error downloading requestet files.Failed to initialize the download. What should i do? ?
-
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
-
lol i maked it and i dont found it , i was mapper and I didnt know how to script that
-
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
-
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 )
-
let us see the code pls and use [lua] tags [/lua] not [code] tags [/code]
-
L0L NICE 1 DUDE
-
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
-
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
-
You want it as bar form? lol srry i didnt knew it ,here i dont know how to help you i thinked only to show a player his health so: Health:getElementHealth Armor:getPlayerArmor Here it is a example: local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() local playerHealth = getElementHealth(player) local playerArmor = getPlayerArmor(player) function createText( ) dxDrawText( playerHealth, 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) dxDrawText( playerArmor, 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) -- etc im to lazy
-
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
-
When i write in console debugscript 3 it didnt gives errors
-
Client side: --Closed Server side: --Closed
-
When i know good than you can use dxDrawText and getElementHealth and getPlayerArmor dxDrawText : https://wiki.multitheftauto.com/wiki/DxDrawText getElementHealth: https://wiki.multitheftauto.com/wiki/GetElementHealth getPlayerArmor: https://wiki.multitheftauto.com/wiki/GetPlayerArmor Good luck!
-
Ok but when i go to MTA mapeditor it gives:Error downloading requestet files.Failed to initialize the download. Can anyone help me????? please
-
Ah i maked a tuturoial : for moving objects: 1. when making a map, decide what objects you want to be moving 2. move object to desired location (like, if you want an elevator, move it to destination where it should go) and write down its id and position (x-y-z). 3. move your object back where it should start repeat steps 2-3 for all the objects you want to be dynamic 5. save your map when you finished 6. open .map file if you're using 1.0 mapeditor (or convert it if you're using race mapeditor and then open) 7. find your objects' entries (by id you wrote down for example), it should be like this: Code: <object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" /> 8. now add your desired parameters: isMoving="true" - to enable moving movTime="5000" - time to move object form one location to another, in msec (5 sec set here) restTime="1000" - time the object will stay at each location (1 sec set here) 9. and finally add the x-y-z location of end point you wrote down: movX="3446.6684570313" movY="-1914.6517333984" movZ="13.75008392334" and it should look like this: Code: <object id="testobject" model="3115" interior="0" dimension="0" posX="3446.6684570313" posY="-1914.6517333984" posZ="1.2000885009766" rotX="0" rotY="0" rotZ="0" isMoving="true" movTime="5000" restTime="1000" movX="3446.6684570313" movY="-1914.6517333984" movZ="13.75008392334" /> and you're done.
-
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
