-
Posts
1,491 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Walid
-
Add all your resources in mtaserver.conf Example <resource src="resource name here" startup="1" protected="0" />
-
You already asked the same question here
-
addEventHandler("onClientGUIClick", guifinalizuj, function () if guiGetText(tytul) == "Tytuł: Mleko" then guiSetVisible(oknoprz, false) showCursor(false) exports["notifications"]:showBox("info","Na Twoim radarze zostało umieszczone miejsce rozładunku.") jakafura = getPedOccupiedVehicle(localPlayer) nazwafury = getVehicleName(jakafura) trasa = true elseif guiGetText(wyladunek) == "Wyładunek: San Fierro" then punkt = createMarker(-2443.31812, 740.89063, 34, "cylinder", 10, 0, 255, 255, 20) blip = createBlip(-2443.31812, 740.89063, 34.01563, 41) elseif guiGetText(wyladunek) == "Wyładunek: Los Santos" then guiSetText(wynagrodzenie, "$500") elseif guiGetText(wyladunek) == "Wyładunek: Las Venturas" then guiSetText(wynagrodzenie, "$2000") elseif guiGetText(wyladunek) == "Wyładunek: Bayside" then guiSetText(wynagrodzenie, "$1700") elseif guiGetText(wyladunek) == "Wyładunek: Fort Carson" then guiSetText(wynagrodzenie, "$1800") elseif guiGetText(wyladunek) == "Wyładunek: Angel Pine" then guiSetText(wynagrodzenie, "$700") elseif guiGetText(wyladunek) == "Wyładunek: Palomino Creek" then guiSetText(wynagrodzenie, "$1000") elseif guiGetText(wyladunek) == "Wyładunek: Blubbery" then guiSetText(wynagrodzenie, "$900") elseif guiGetText(wyladunek) == "Wyładunek: Doki" then guiSetText(wynagrodzenie, "$100") elseif nazwa == "Roadtrain" then triggerServerEvent("cysterna", resourceRoot) outputChatBox("Do tego rodzaju pojazdu wymagana jest przyczepa. Uważaj! Nie zgub jej.", 0, 255, 0) end end ) You need to post full code here
-
Yes you can -- Example function rectangle( x, y, width, height, color,postGUI ) return dxDrawRectangle (x, y, width, height, color,postGUI ) end
-
use FileZilla
-
Try to use this untested. -- Server side [arrowTable] = {} addCommandHandler("aduty", function(player) if isElement(player) then local duty = getElementData(player, "duty") or 0 if duty == 0 then if not isElement(arrowTable[player]) then local x,y,z = getElementPosition(player) arrowTable[player] = createMarker(x,y,z, "arrow", 0.75, 255, 0, 0, 175) attachElements(arrowTable[player], player, 0, 0, 2) triggerClientEvent(player,"ShowText",player,"output",arrowTable[player]) else if isElement(arrowTable[player]) then destroyElement(arrowTable[player]) arrowTable[player] = nil triggerClientEvent(player,"ShowText",player,"remove",arrowTable[player]) end end end end end) addEventHandler("onPlayerQuit", root, function() if isElement(arrowTable[source]) then destroyElement(arrowTable[source]) arrowTable[source] = nil end end) -- Client side local screenX, screenY = guiGetScreenSize () function leaderText() local xm,ym,zm = getElementPosition(marker) local x,y = getScreenFromWorldPosition(xm,ym,zm+0.2) local camX,camY,camZ = getCameraMatrix() if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, xm,ym,zm) <= 20) then dxDrawText ("Hello", x,y,x,y, tocolor (255,0, 0, 255) , ( screenX / 1440 ) * 2 , "default-bold" , "center" , "center" , false , true , false ) end end function Text (type,mar) if type == "output" then marker = mar addEventHandler("onClientPreRender",root,leaderText) elseif type == "remove" then removeEventHandler("onClientPreRender",root,leaderText) end end addEvent("ShowText",true) addEventHandler("ShowText",root,Text)
-
the speed difference between ipairs and pairs is negligible "really really small". i already tested it pairs was faster than ipairs by 0.0000000339seconds. only when you have tables nearing 15k keyvalues.
-
Server function Lalavip(player) if isElement(player) then triggerClientEvent(player, "ShowVipPanel",player) end end addCommandHandler("vip",Lalavip)
-
Try this one function changeSkin(oldModel, newModel) if (getElementType(source) == "player") then if (newModel == 0) then loadClothes(source) end end end addEventHandler("onElementModelChange", root, changeSkin)
-
لا يوجد أي شيئ خاطئ حط الكود الكامل هنا
-
I have to do what? Please give me a friend for example. you need an object id to fix all your warnings example replace model with 3886.
-
not bad local screenX, screenY = guiGetScreenSize () function leaderText(marker) local xm,ym,zm = getElementPosition(marker) local x,y = getScreenFromWorldPosition(xm,ym,zm+0.2) local camX,camY,camZ = getCameraMatrix() if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, xm,ym,zm) <= 20) then dxDrawText ("Hello", x,y,x,y, tocolor (255,0, 0, 255) , ( screenX / 1440 ) * 2 , "default-bold" , "center" , "center" , false , true , false ) end end Now try to use triggerClientEvent and post your code here and i will help you Note :use LUA highlight syntax
-
function onClickButtons1 ( ) if source == Abo3abd.button[6] then onExit() elseif source == Abo3abd.button[7] then onExit() elseif source == Abo3abd.button[8] then onExit() elseif source == Abo3abd.button[9] then onExit() end end addEventHandler ("onClientGUIDoubleClick", root, onClickButtons1 ) function onExit ( ) guiSetVisible ( Abo3abd.window[1],false ) showCursor ( false ) end
-
it dosent work because the player is already holding the gun try to switch you can use this function disableWeaponOnGodMod (prev,new) if getElementData(localPlayer, "invincible") then setPedWeaponSlot(localPlayer, 0) end end addEventHandler ( "onClientPlayerWeaponSwitch", localPlayer, disableWeaponOnGodMod ) or you can use onClientRender or a timer to check the player weapon slot every time addEventHandler ( "onClientRender", root, disableWeaponOnGodMod )
-
replace player with source here About second question all what you need is triggerClientEvent getScreenFromWorldPosition() getCameraMatrix() getDistanceBetweenPoints3D() dxDrawText
-
Try this function disableWeaponOnGodMod (prev,new) if getElementData(localPlayer, "invincible") then if getPedWeapon(localPlayer,new) ~= 0 then setPedWeaponSlot(localPlayer, 0) end end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), disableWeaponOnGodMod )
-
yes it's possible All what you need is -- meta.xml download="false" -- Using "false" will mean files Will Not Be Downloaded on resource start. -- Function downloadFile() -- use it to download files when the player spawn. -- Events onClientPlayerSpawn onClientFileDownloadComplete -- This event is triggered when a file has been downloaded after downloadFile has been successfully called.
-
Try this it should work function changeSkin(oldModel, newModel) if (getElementType(source) == "player") then if (newModel == 0) then executeCommandHandler ("loadClothes", source) end end end addEventHandler("onElementModelChange", root, changeSkin)
-
Try this function giveMeWeapon(weapon, amount) if getElementData(source, "invincible") then outputChatBox(" your message here ",source,255,0,0) return end if weapon > 50 then return end if table.find(getOption('weapons.disallowed'), weapon) then errMsg((getWeaponNameFromID(weapon) or tostring(weapon)) .. 's are not allowed', source) else giveWeapon(source, weapon, amount, true) end end
-
check all your resources till you find the chinese language.
-
what error you are getting?
-
post full code here
-
Really i don't undrestand what you want exactly Show me the part where you add the command .
-
Show me the part where you add the command .