-
Posts
45 -
Joined
-
Days Won
1
Everything posted by URBAN
-
Maybe you are using custom radar many custom radars dont support blips
-
markers[num].Blip = createBlip( markers[num].X, markers[num].Y, markers[num].Z, markers[num].MType, 1, 255, 0, 0, 200 ) createBlip's last arg sets blip's visible distance.
-
function onPlayerSpawn() giveWeapon(source,getWeaponIDFromName("parachute"),1,true) end addEventHandler("onPlayerSpawn",getRootElement(),onPlayerSpawn) NOTE: Put it on server side
-
getPlayerGroup wants player, not account name local gates = { --Military Base {model=980, gatePos="3239.2001953125, -1962.599609375, 13", gatePosRot="0, 0, 91.746826171875", gateMarker="3239.8000488281, -1962.5999755859, 11.39999961853", moveTo="3239.2001953125, -1962.599609375, 18.39999961853", speed=1000, size=16, Group="Military", moveBack=6000}, } local gateMarkers = {} local gateTimers = {} local playersInGate = {} addEventHandler("onResourceStart",resourceRoot, function () for index, gate in pairs(gates) do local markerPos = split(gate.gateMarker, ",") local gatePos = split(gate.gatePos, ",") local gatePosRot = split(gate.gatePosRot, ",") local moveTo = split(gate.moveTo, ",") gateObject = createObject(gate.model, gatePos[1], gatePos[2], gatePos[3], gatePosRot[1], gatePosRot[2], gatePosRot[3]) gateMarker = createMarker(markerPos[1], markerPos[2], markerPos[3], "cylinder", tonumber(gate.size), 0, 0, 0, 0) playersInGate[gateMarker] = {} gateMarkers[gateMarker] = {gate=gateObject, moveTo={moveTo[1], moveTo[2], moveTo[3]}, gatePos={gatePos[1], gatePos[2], gatePos[3]}, speed=gate.speed, Group=gate.Group, moveBack=gate.moveBack or false} addEventHandler("onMarkerHit",gateMarker,onBaseGateMarkerHit) addEventHandler("onMarkerLeave",gateMarker,onBaseGateMarkerLeave) end end) function onBaseGateMarkerHit(hitPlayer) if not hitPlayer then return end if not gateMarkers[source] then return end local account = getPlayerAccount(hitPlayer) if not account or isGuestAccount(account) then return end local playerAcc = getAccountName(account) local gang = exports["NGGroups"]:getPlayerGroup(hitPlayer) if (gang == tostring(gateMarkers[source].Group)) then if getElementData(source,"gateMoving") then return end setElementData(source,"gateMoving",true) moveObject(gateMarkers[source].gate, gateMarkers[source].speed, unpack(gateMarkers[source].moveTo)) table.insert(playersInGate[source], hitPlayer) setTimer(moveObject,gateMarkers[source].moveBack or 3000,1,gateMarkers[source].gate,gateMarkers[source].speed,unpack(gateMarkers[source].gatePos)) setTimer(setElementData,3000,1,source,"gateMoving",false) end end function onBaseGateMarkerLeave(hitPlayer) local index = 0 if not hitPlayer then return end if not gateMarkers[source] then return end for index, player in pairs(playersInGate[source]) do index = index +1 if player == hitPlayer then table.remove(playersInGate[source], index) end end end function getGroupMembersWithinColshape(colshape, marker) return playersInGate[marker] end function checkGate(marker) if #getGroupMembersWithinColshape ( getElementColShape(marker), marker ) > 0 then return else moveObject(gateMarkers[marker].gate,gateMarkers[marker].speed,unpack(gateMarkers[marker].gatePos)) setTimer(setElementData,2000,1,marker,"gateMoving",false) if isTimer(gateTimers[marker]) then killTimer(gateTimers[marker]) end end end
-
1. As far as i know its not, but making panels, buttons harder than standart gui maybe thats why they use. 2. Yes it is standart gui.
-
https://wiki.multitheftauto.com/wiki/Split split(string,"1x")
-
--Client local shader = dxCreateShader("tex.fx",0, 0, true, 'ped') addEvent("broadcastEnableShader", true) -- allow remotely triggered (from server) addEventHandler("broadcastEnableShader", root, function(some_data) -- receive broadcast from the server local img = dxCreateTexture(""..math.random(1,3)..".png") dxSetShaderValue(shader, "tex", img) engineApplyShaderToWorldTexture(shader, "Hoodie_green_co",some_data) end ) addEventHandler( 'onClientResourceStart', resourceRoot, function() for _, p in ipairs(getElementsByType('ped')) do if isElementStreamedIn(p) then local clothing = getElementData(p, 'blood') if clothing then triggerServerEvent("announceEnableShader", localPlayer, p) end end end for _, p in ipairs(getElementsByType('player')) do if isElementStreamedIn(p) then local clothing = getElementData(p, 'blood') if clothing then triggerServerEvent("announceEnableShader", localPlayer, p) end end end end) addEventHandler( 'onClientElementStreamIn', root, function() if getElementType(source) == 'player' or getElementType(source) == 'ped' then local clothing = getElementData(source, 'blood') if clothing then triggerServerEvent("announceEnableShader", localPlayer, source) end end end) addEventHandler( 'onClientElementDataChange', root, function(name) if (getElementType(source) == 'player' or getElementType(source) == 'ped') and isElementStreamedIn(source) and name == 'blood' then if getElementData(source, 'blood') then triggerServerEvent("announceEnableShader", localPlayer, source) end end end) --SERVER addEvent("announceEnableShader", true) addEventHandler("announceEnableShader", root, function (some_data) -- for i,player in ipairs(getElementsByType("player")) do triggerClientEvent("broadcastEnableShader", player, some_data) end end ) I didnt test it but i hope it will work.
- 3 replies
-
- synchronization
- player
-
(and 1 more)
Tagged with:
-
My friend got banned 3-4 months ago and He sent mail to [email protected] but noone gave reply. His serial is: F4B4A43EDE28E72AD6BAD081D23F9F82
-
function getPserial (player,cmd) local serial = getPlayerSerial(player) local db = dbPoll(dbQuery(connection,"SELECT * FROM accounts WHERE serial = ?", serial), -1) for i, row in ipairs(db) do return outputChatBox("Serial Found") end return outputChatBox("Serial Not Found") end addCommandHandler("getserial") This will work.
-
local friends = { ["Emergency"] = true, } function onStart () for index, theTeam in ipairs(friends) do if (getTeamFriendlyFire(getTeamFromName(theTeam)) == false) then setTeamFriendlyFire(getTeamFromName(theTeam),true) end end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStart) setTeamFriendlyFire and getTeamFriendlyFire wants team, not team name. So u need to use getTeamFromName. And also you should call this function in onResourceStart --- function onStart () for i = 0,46 do setWeaponProperty(i,"poor","damage",getOriginalWeaponProperty(i,"poor","damage")) setWeaponProperty(i,"std","damage",getOriginalWeaponProperty(i,"std" "damage")) setWeaponProperty(i,"pro","damage",getOriginalWeaponProperty(i,"pro","damage")) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStart) This code will revert all weapons damages to original.
-
https://community.multitheftauto.com/index.php?p=resources&s=details&id=9117 and as i know it needs slothbot https://community.multitheftauto.com/index.php?p=resources&s=details&id=672
-
https://wiki.multitheftauto.com/wiki/DxDrawCircle https://wiki.multitheftauto.com/wiki/DxDrawLine https://wiki.multitheftauto.com/wiki/BindKey Here you are.
- 2 replies
-
- radar
- battle royale
-
(and 2 more)
Tagged with:
-
@joriss11 function checkDamage(loss) if getElementHealth(source) > 301 then setVehicleDamageProof(source,false) setVehicleEngineState(source,true) else setVehicleDamageProof(source,true) setVehicleEngineState(source,false) for i,player in pairs(getVehicleOccupants(source)) do removePedFromVehicle(player) end end end addEventHandler("onVehicleDamage",getRootElement(),checkDamage) Use this version i just changed position of loop
