-
Posts
980 -
Joined
-
Last visited
-
Days Won
1
Everything posted by manawydan
-
Como utilizar o httpdownloadurl
manawydan replied to imCEASER's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
você comprou um host e não ta conseguindo coloca os mods nele ou ta dizendo em guardar os mods em um um site e baixa pelo http download url? -
change animation?
-
bom é isso ai, sempre preste atenção detalhadamente e você consegue.
-
try this, no tested local screenWidth, screenHeight = guiGetScreenSize ( ) function outputSpeed() if isPedInVehicle(localPlayer) then local vehicle = getPedOccupiedVehicle(localPlayer) local x,y,z = getElementVelocity(vehicle) local km = (x^2 + y^2 + z^2) ^ 0.5 * 180 dxDrawText(km,44,screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end end addEventHandler("onClientRender", root, outputSpeed)
-
you can use weapon property or onPlayerDamage event , chech the weapon getPedWeapon, check armor and health and use some math.
-
pode ser problema de seu mod de spawn. se possivel poste ele aqui
-
tente fazer isso: local myMarker = createMarker( 2036.1735839844, -1413.0563964844, 16.9921875, 'cylinder',2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) if(elementType == "player") then local model = getElementModel(hitElement) if(model~=280)then setElementModel(hitElement,280) outputChatBox("Militare", hitElement) else outputChatBox("Ja tens esta Skin!", hitElement, 255, 0, 0) end end end addEventHandler( "onMarkerHit", myMarker, MarkerHit)
-
Erro Ao Registrar !
manawydan replied to itzclosed's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
o resource tem direito no acl?(certas funções são bloqueadas se não tiverem direitos) -
Thanks, You're welcome
-
addEvent("ReduceMoneyTrigger",true) addEventHandler("ReduceMoneyTrigger",root, function() local money = getPlayerMoney(client) if(money>=500)then takePlayerMoney(client,500) setPedStat(client,24,999) setElementHealth(client,200) else outputChatBox("No enought money",client) end end)
-
but here is better(i think) client marker_00 = createMarker(1178,-1317,14,"cylinder",1,255,255,150) marker_01 = createMarker(1252,329,20,"cylinder",1,255,255,150) marker_02 = createMarker(-312,1052,20.5,"cylinder",1,255,255,150) marker_03 = createMarker(1600,1820,11,"cylinder",1,255,255,150) marker_04 = createMarker(-2667,636,14.5,"cylinder",1,255,255,150) marker_05 = createMarker(2030,-1405,17.5,"cylinder",1,255,255,150) marker_06 = createMarker(-1520,2520,56,"cylinder",1,255,255,150) marker_07 = createMarker(-2190,-2300,30.5,"cylinder",1,255,255,150) marker_08 = createMarker(2026,-1408,16,"cylinder",1,255,255,150) function takeHisMoney(thePlayer) if(source==marker_00) or(source==marker_01)or (source==marker_02)or(source==marker_03)or(source==marker_04) or(source==marker_05) or (source==marker_06) or (source==marker_07)or(source==marker_08) then triggerServerEvent("ReduceMoneyTrigger",thePlayer) end end addEventHandler("onClientMarkerHit", root,takeHisMoney)
-
try: client marker_00 = createMarker(1178,-1317,14,"cylinder",1,255,255,150) marker_01 = createMarker(1252,329,20,"cylinder",1,255,255,150) marker_02 = createMarker(-312,1052,20.5,"cylinder",1,255,255,150) marker_03 = createMarker(1600,1820,11,"cylinder",1,255,255,150) marker_04 = createMarker(-2667,636,14.5,"cylinder",1,255,255,150) marker_05 = createMarker(2030,-1405,17.5,"cylinder",1,255,255,150) marker_06 = createMarker(-1520,2520,56,"cylinder",1,255,255,150) marker_07 = createMarker(-2190,-2300,30.5,"cylinder",1,255,255,150) marker_08 = createMarker(2026,-1408,16,"cylinder",1,255,255,150) function takeHisMoney(thePlayer) triggerServerEvent("ReduceMoneyTrigger",thePlayer) end addEventHandler("onClientMarkerHit", marker_00,takeHisMoney) addEventHandler("onClientMarkerHit", marker_01,takeHisMoney) addEventHandler("onClientMarkerHit", marker_02,takeHisMoney) addEventHandler("onClientMarkerHit", marker_03,takeHisMoney) addEventHandler("onClientMarkerHit", marker_04,takeHisMoney) addEventHandler("onClientMarkerHit", marker_05,takeHisMoney) addEventHandler("onClientMarkerHit", marker_06,takeHisMoney) addEventHandler("onClientMarkerHit", marker_07,takeHisMoney) addEventHandler("onClientMarkerHit", marker_08,takeHisMoney) server addEvent("ReduceMoneyTrigger",true) addEventHandler("ReduceMoneyTrigger",root, function() local money = getPlayerMoney(client) if(money>=500)then takePlayerMoney(client,500) else outputChatBox("No enought money",client) end end)
-
yes
-
addEventHandler("onVehicleExplode",root, function() if(carUsedCount[source]) then carUsedCount[source] =nil end end)
-
nice login system.
-
try use colShape or zone
-
apague o local da frente da função ou adicione uma variavel e depois o =
-
You're welcome. dont forget to "clean" table if vehicle explode.
-
sim, pode testar.
-
so this? local carUsedCount = {} function inCar(thePlayer) if (carUsedCount[source]) then carUsedCount[source] = carUsedCount[source] +1 else carUsedCount[source] = 1 end if (carUsedCount[source] == 1) then outputChatBox("First time to enter in this vehicle",thePlayer) end if (carUsedCount[source] == 2) then outputChatBox("Second time to enter in this vehicle",thePlayer) end end addEventHandler("onVehicleEnter" ,root, inCar)
-
use essa função pra criar blip grudada em algum objeto. createBlipAttachedTo Ex: createBlipAttachedTo(player,56)
-
Error Downloading [Erro]
manawydan replied to Shoter_BR's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Você podia pedir ajuda pros gringos, eles são especialista nisso. Principalmente townwilian(não me lembro se é esse o nick dele, mas em bugs e tal do mta ele é expert ja que é adm). -
You're welcome!
-
ok try again server outputChatBox ("Alex Mercer is attacking Los Santos ! Stop him before he transforms the whole city into a giant hive !",getRootElement(), 255, 0, 0, true ) function boss ( ) Alex = exports [ "slothBot" ]:spawnBot ( 1479.33984375, -1675.4399414063, 14.0406875, 90, 308, 0, 0, Alex, 0, "hunting", true ) exports.extra_health:setElementExtraHealth ( Alex, 75000 ) myBlip = (createBlipAttachedTo ( Alex, 41 )) setElementData ( Alex, "alex", true ) setBotWeapon (Alex, 0) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), boss ) function money (theKiller) if (source == Alex) then givePlayerMoney(theKiller,math.random(5000000,10000000)) outputChatBox ( getPlayerName ( theKiller ) .. " stopped Alex Mercer ! But the virus will never die ...",getRootElement(), 10, 255 , 10, true ) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) addEvent("KillByAlex",true) addEventHandler("KillByAlex",root, function(atacker) killPed(source,atacker) end) Client function alexattack ( attacker, weapon, bodypart ) if (attacker) then if (getElementData (attacker, "alex") == true) then triggerServerEvent("KillByAlex",source,attacker) end end end addEventHandler ( "onClientPlayerDamage",root, alexattack )