-
Posts
980 -
Joined
-
Last visited
-
Days Won
1
Everything posted by manawydan
-
try local sirenObject = {} function objectSiren ( thePlayer ) local theVehicle = getVehicleController(thePlayer) if theVehicle then if (getVehicleSirensOn ( theVehicle ) == true) then sirenObject[thePlayer] = createObject ( 10000,0,0,4 ) attachElements ( sirenObject[thePlayer] , theVehicle, -0.4,-0.1,0.8 ) else destroyElement(sirenObject[thePlayer]) end end end function StartBindKey() bindKey(source,"h","down",objectSiren) end addEventHandler("onPlayerJoin",root,StartBindKey)
-
triggerClientEvent bindKey
-
getElementsByType dx functions isObjectInACLGroup getPedBonePosition
-
[REL] HeroInventory - Inventory System [Groups + More]
manawydan replied to Malicious Hero.'s topic in Resources
any help? -
apenas uma coisa estudar muito. você pode criar scripts até mesmo no bloco de notas. no nosso caso existi a wiki mta que tem as funções e eventos "definidos"! de uma olhada aqui: http://www.lua.org/manual/5.1/pt/manual.html antes de começar "scriptando" eu acho bom saber a logica de programação. boa sorte!
-
addVehicleSirens source is vehicle?
-
https://community.multitheftauto.com/in ... ls&id=2540
-
Ajuda ae. Por favor
manawydan replied to Staan's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
você poderia pedir informações dos administradores deste server. -
boa sorte!
-
will not even try?
-
triggerClientEvent
-
try no tested local deliverP = { --Los Santos {1787.7626953125, -2555.7822265625, 13}, {-1662.8570556641, -291.42846679688, 14}, {1448.5712890625, 1508.5714111328, 10} } thisRes = getResourceRootElement(getThisResource()) local PilotPlane = createVehicle (593, 1890.3594970703, -2493.8330078125, 13.53911781311) function PilotDeliver() local random1 = math.random(#deliverP) x, y, z = deliverP[random1][1], deliverP[random1][2], deliverP[random1][3] delBlip = createBlip ( x,y,z, 51) delmarker = createMarker ( x,y,z, "cylinder", 5, 255, 160, 0, 100) outputChatBox ( "You have a new flight , go to location bliped on your map!", root, 255, 100, 0, true ) end addCommandHandler ("startshift", PilotDeliver) function DelPayment(hitElement) if getElementType(hitElement) == "player" and getElementModel(getVehicleController(hitElement)) == 593 then randomPay = math.random ( 2000, 5000 ) givePlayerMoney (randomPay) outputChatBox ( "You Arrived to your distenation , This is your payment"..tostring(randomPay).."$", root, 255, 100, 0, true ) end end addEventHandler ("onMarkerHit", delmarker, DelPayment)
-
localPlayer ? localPlayer is client
-
voce poderia usar setTimer
-
[REL] HeroInventory - Inventory System [Groups + More]
manawydan replied to Malicious Hero.'s topic in Resources
-- exportando inventario --exports [ "heroinventory" ]:addInventoryGroup( "Armas", "Armas.png" ) --exports [ "heroinventory" ]:addInventoryGroup( "Itens", "Itens.png" ) function InventarioSpawn() exports [ "heroinventory" ]:addPlayerItem(source,1,1) exports [ "heroinventory" ]:addPlayerItem(source,2,1) exports [ "heroinventory" ]:addPlayerItem(source,3,1) exports [ "heroinventory" ]:addPlayerItem(source,4,1) end addEventHandler("onPlayerSpawn",getRootElement(),InventarioSpawn) function UsarItemInventario(ID,qu) if ID == 1 and getPedWeapon (source) == 22 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,1,1) setWeaponAmmo(source,22,getPedTotalAmmo(source)+17) setPedAnimation( source, "COLT45", "colt45_reload",-1000,false) AnimacaoNula(source,1000) elseif ID == 2 and getPedWeapon (source) == 25 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,2,1) setWeaponAmmo(source,25,getPedTotalAmmo(source)+7) setPedAnimation( source, "BUDDY", "buddy_reload",-1700,false) AnimacaoNula(source,1700) elseif ID == 3 and getPedWeapon (source) == 34 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,3,1) setWeaponAmmo(source,34,getPedTotalAmmo(source)+5) setPedAnimation( source, "BUDDY", "buddy_reload",-1700,false) AnimacaoNula(source,1700) elseif ID == 4 and getPedWeapon (source) == 29 or getPedWeapon (source) == 28 or getPedWeapon (source) == 32 and getPedTotalAmmo(source)>0 then exports [ "heroinventory" ]:removeItemFromPlayer(source,4,1) local Wid = getPedWeapon (source) setWeaponAmmo(source,Wid,getPedTotalAmmo(source)+math.random(10,20)) setPedAnimation( source, "UZI", "UZI_reload",-1500,false) AnimacaoNula(source,1500) end end addEvent("onPlayerUseItem",true) addEventHandler("onPlayerUseItem",getRootElement(),UsarItemInventario) function AnimacaoNula(source,Tempo) setTimer(setPedAnimation,Tempo,1,source,nil) end I have a problem. Even after the item away (vanish), the player can still click and get more. obs: I added the group "armas" in inventories (heroinventory). -
function kitarmas(thePlayer) if isGuestAccount(getPlayerAccount(thePlayer)) then return end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then giveWeapon(thePlayer, 4, 200, true) giveWeapon(thePlayer, 24, 200, true) giveWeapon(thePlayer, 26, 200, true) giveWeapon(thePlayer, 28, 200, true) giveWeapon(thePlayer, 31, 200, true) giveWeapon(thePlayer, 34, 200, true) giveWeapon(thePlayer, 37, 200, true) giveWeapon(thePlayer, 16, 200, true) giveWeapon(thePlayer, 46, 200, true) outputChatBox("#00ff00[Kitadmin]: Você pegou o Kit admin", thePlayer, 255, 255, 255, true) end end addCommandHandler("kitadmin", kitarmas) editado, desculpe o erro!
-
probar addEventHandler( "onClientResourceStart", getResourceRootElement(), function ( ) fadeCamera( true ); setTimer( MyAleatoriu, 50, 1 ); end ) function MyAleatoriu() local Aleatorio = math.random(1,3) if (Aleatorio == 1) then setCameraMatrix(1574.53515625, -1017.4836425781, 120,1402.880859375, -785.837890625, 50) elseif(Aleatorio == 2) then setCameraMatrix(otros argu..) elseif(Aleatorio == 3) then setCameraMatrix(otros argu..) end end
-
math.random ?
-
perdon
-
probar este local VeiculosT = {} addEventHandler( "onPlayerSpawn", getRootElement(), function() if (getPlayerTeam(source) == getTeamFromName("TuTeamExemplo")) then local x, y, z = getElementPosition( source ) VeiculosT[source] = createVehicle( MODELO, x, y, z + 1.75 ) warpPedIntoVehicle( source,VeiculosT[source]) end end )
-
mission system?
-
try no tested function theGUIshow(thePlayer) local account = getPlayerAccount(thePlayer) local accName1 = getAccountName(account) if isObjectInACLGroup ("user."..accName1, aclGetGroup ( "VIP" ) ) then triggerClientEvent(thePlayer,"showTheGUI", thePlayer) end end function BindHere() bindKey(source, "f1", "down", theGUIshow) end addEventHandler("onPlayerLogin",getRootElement(),BindHere)
-
any errors? use /debugscript 3
-
you could try to create, we're here to help.