-
Posts
814 -
Joined
-
Last visited
Everything posted by Wei
-
Source is not defined if you startJob function as startJob()ž Try that: function startJob() if (isElement(source)) then local id = getElementModel(source) if (id == 403) or (id == 515) or (id == 456) then local x, y, z = unpackMarkers() jobMarker = createMarker(x, y, z, "cylinder", 4, 255, 255, 0, 255) jobBlip = createBlipAttachedTo(jobMarker, 41) triggerServerEvent("visibleTruck", getLocalPlayer(), jobMarker, jobBlip) end else if getPedOccupiedVehicle(localPlayer) then local id = getElementModel(getPedOccupiedVehicle(localPlayer) ) if (id == 403) or (id == 515) or (id == 456) then local x, y, z = unpackMarkers() jobMarker = createMarker(x, y, z, "cylinder", 4, 255, 255, 0, 255) jobBlip = createBlipAttachedTo(jobMarker, 41) triggerServerEvent("visibleTruck", getLocalPlayer(), jobMarker, jobBlip) end end end end addEventHandler("onClientVehicleEnter", root, startJob) addEventHandler("onClientMarkerHit", root, function(hitElement, matchingDimension) if (isPedInVehicle(hitElement)) and (source == jobMarker) then local vehicle = getPedOccupiedVehicle(hitElement) local car = getElementModel(vehicle) if (car == 403) or (car == 515) or (car == 514) then triggerServerEvent("payTrucker", localPlayer) if isElement(jobMarker) then destroyElement(jobMarker) end if isElement(jobBlip) then destroyElement(jobBlip) end startJob() end end end )
-
Did you execute .sql file in phpmyadmin ?
-
local function connect( ) -- retrieve the settings local server = get( "server" ) or "127.0.0.1" -- server local user = get( "user" ) or "root" -- username local password = get( "password" ) or "21242722" -- password local db = get( "database" ) or "rpvx" -- database local port = get( "port" ) or 3306 local socket = get( "socket" ) or nil
-
if exp system uses element data you can use it like that addEventHandler ( "onClientElementDataChange", getRootElement(), function ( dataName ) if getElementType ( source ) == "player" and dataName == "exp" then if getElementData(source, "exp") == 3 then outputChatBox ("Data is 3") elseif getElementData(source, "exp") == 5 then outputChatBox ("Data is 5") end end end )
-
He's using MTA Venux made by AeroXBird. You must set the sql resource at first place at mtaserver.conf
-
From wiki: --First, we create a function for the event handler to use. function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if weapon == 38 then -- If the player shoots with a minigun, and hits another player... outputChatBox ( "Don't kill people with minigun, it's lame!", 255, 0, 0 ) -- We output a warning to him. end end -- Add this as a handler so that the function will be triggered every time the local player fires. addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc ) Just modyfy the weapon id
-
That means that you must have .Format at the and of the link
-
You can make your own onTeamChange event and save nametag color, and on the event you apply it
-
You can't set camera target to vehicle -- Wiki wrote: This function allows you to set a player's camera to follow other elements instead. Currently supported element type is: Players
-
local progCount = 0 function greetingHandler ( ) guiProgressBarSetProgress ( progressBar, ( guiProgressBarGetProgress ( progressBar ) + 50 ) ) local mu = guiProgressBarGetProgress (progressBar) if mu >= 100 then guiProgressBarSetProgress(progressBar, 0) progCount = progCount+1 end if progCount == 1 then -- if progress count is 1 guiSetText(nivlab, "1") elseif progCount == 2 then guiSetText(nivlab, "2") -- if progress count is 2 end end addEvent ( "gret", true ) addEventHandler ( "gret", getRootElement(), greetingHandler ) Try this
-
function="query" type="server" /> Why do you export query if your function name is start?
-
local root = getRootElement() local player = getLocalPlayer() local counter = 0 local starttick local currenttick addEventHandler("onClientRender",root, function() if not starttick then starttick = getTickCount() end counter = counter + 1 currenttick = getTickCount() if currenttick - starttick >= 1000 then setElementData(player,"fps",counter) counter = 0 starttick = false end dxDrawText(""..counter.."", 898, 689, 1018, 736, tocolor(0, 255, 0, 255), 1.00, "default", "left", "top", false, false, true, false, false) end ) This should work
-
That code worked for me...
-
-- Buttons -- buttons = { ["btn"] = guiCreateStaticImage(0.628, 0.37, 0.02, 0.032, "img/log.png", true, bg ) } -- Buttons -- -- Alpha -- guiSetAlpha ( buttons["btn"], 0.75 ) -- Alpha -- -- Handlers -- addEventHandler( "onClientMouseEnter", root, function(aX, aY) for key,gui in pairs (buttons) do if gui == source then guiSetAlpha ( source, 1 ) end end end )
-
safecol = createColCuboid ( -4114.1, -2998.8, 379.5, 70, 70, 70 ) safeZone = createMarker ( 2244.20752, 498.09100, 11.70, "cylinder", 150, 0, 255, 0, 0 ) -- Line 1600 function toggleFRWindow() if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else if (not isElementWithinColShape(localPlayer, safecol)) then showCursor(true) showAllWindows() end end end Sorry my bad, I didn't you you want to block it inside area...
-
safecol = createColCuboid ( -4114.1, -2998.8, 379.5, 70, 70, 70 ) safeZone = createMarker ( 2244.20752, 498.09100, 11.70, "cylinder", 150, 0, 255, 0, 0 ) -- Line 1600 function toggleFRWindow() if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else if (isElementWithinColShape(localPlayer, safecol)) then showCursor(true) showAllWindows() end end end Try that
-
fr_client.lua: -- Line 1600 function toggleFRWindow() if isWindowOpen(wndMain) then showCursor(false) hideAllWindows() colorPicker.closeSelect() else -- add restriction here showCursor(true) showAllWindows() end end
-
http://upload.mtasa.com/u/895188177/public.rar
-
Single player works fine. I played only cs 1.6 on this computer. Is maybe hardware problem ?
-
Same problem MTADiag: http://pastebin.mtasa.com/931537018
-
When I enter server, and that loading thingy stops, it restarts my computer. MTADiag: http://pastebin.mtasa.com/991411176 MTA used to work properly on my computer...
-
dxDrawText -- to create text getScreenFromWorldPosition -- to make a text on world position isLineOfSightClear -- check that no wall is beetween him and another player getDistanceBetweenPoints2D -- distance that you will not see text trougt whole map "onClientRender"--event
-
8x 16 Slot servers for free! gta-servers.net giveaway!
Wei replied to =FAS=Shigawire's topic in Hosting solutions
Name: blazy Server name: Blazy's scripting server!@ gta-servers.net* My e-mail: [email protected] Location: Germany