-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
function replaceModel() local ID = 6 txd = engineLoadTXD("shovel.txd", ID ) engineImportTXD(txd, ID ) dff = engineLoadDFF("shovel.dff", 0 ) engineReplaceModel(dff, ID ) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceModel) addCommandHandler ( "reloadskin", replaceModel )
-
Klesh: What has getElementsByType to do with target? she's talking about aiming.
-
You're welcome. P.S: You can remove the attacker fire with setPedOnFire(attacker, false).
-
There's a public minesweeper resource in the MTA community, maybe chaos.de.to is using it. @StuartUK: Is not released yet, is it? if so, you forgot to add the download link.
-
Oops , my bad, I couldn't see that your original code had missing "then", here: function setOnFire(attacker, attackerweapon, bodypart, loss) if (attackerweapon == 6) and (loss > 1) then setPedOnFire(source, true) end end addEventHandler ("onPlayerDamage", getRootElement(), setOnFire)
-
The only explanation is that you're either editing a wrong resource, or you aren't restarting it at all, are you sure there's no error's in your script? not from that function, but you said that you have some team functions as well.
-
You're damaging a PLAYER, right? not a PED. I don't know what else could be, that message should output the name of the player you've just attacked.
-
function setOnFire(attacker, attackerweapon, bodypart, loss) outputChatBox("Damaged ".. getPlayerName(source)) if (attackerweapon == 6) and (loss > 1) setPedOnFire(source, true) end end addEventHandler ("onPlayerDamage", getRootElement(), setOnFire) Use that and tell me if it output's the message.
-
Are you sure it doesn't work? have you set it up as server side?
-
Maybe because you haven't used setPedOnFire at all? NEVER CALL A FUNCTION LIKE A NATIVE MTA ONE. --predators function setOnFire(attacker, attackerweapon, bodypart, loss) if (attackerweapon == 6) and (loss > 1) then setPedOnFire(source, true) end end addEventHandler ("onPlayerDamage", getRootElement(), setOnFire)
-
Es que no te das cuenta que tenes una tabla para agregar nuevos skins?? local skins = {{"m4", 356}, {"ak47", 355}, {"bat", 336}, {"bomb", 363}, {":O", 357}, {"knifecur", 335}, {"micro_uzi", 352}, {"rocketla", 359}, {"satchel", 365}, {"shotgspa", 351}, {"tec9", 372}, {"NUEVO", NUEVOMODELOACA}}
-
Esto es un tremendo lio, la tabla era para remplazar todos los skins a la vez, no tenias porque usar "else" (sin un 'if' nunca iva a funcionar ). local skins = {{"m4", 356}, {"ak47", 355}, {"bat", 336}, {"bomb", 363}, {"cuntgun", 357}, {"knifecur", 335}, {"micro_uzi", 352}, {"rocketla", 359}, {"satchel", 365}, {"shotgspa", 351}, {"tec9", 372}} function load() for index, skin in pairs(skins) do engineImportTXD(engineLoadTXD ( skin[1].. ".txd" ), skin[2]) engineReplaceModel(engineLoadDFF ( skin[1].. ".dff", skin[2] ) end end addEventHandler("onClientResourceStart",resourceRoot, function () setTimer ( load, 1000, 1) end)
-
You're welcome.
-
That's not possible, must be something else in your script. Post your entire script.
-
You can use shaders to draw text on walls.
-
That's just useless, true and false in outputChatBox will just enable and disable the HEX color codes.
-
local Job1 = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) local Job2 = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) local Job3 = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit(hitElement) if (getElementType(hitElement) == "player" and hitElement == localPlayer) then if (source == Job1) then openJob1Window() elseif (source == Job2) then openJob2Window() elseif (source == Job3) then openJob3Window() end end end addEventHandler("onClientMarkerHit", root, MarkerHit) function markerLeave(leaveElement) if (getElementType(leaveElement) == "player" and leaveElement == localPlayer) then if (source == Job1) then hideJob1Window() elseif (source == Job2) then hideJob2Window() elseif (source == Job3) then hideJob3Window() end end end addEventHandler("onClientMarkerLeave", root, markerLeave)
-
Do you mean that the god mode will be disabled and enabled for everyone? not just Admins. If so: safecol = createColCuboid ( 732, -2577, 0, 120, 150, 40 ) safeZoneRadar = createRadarArea ( 732, -2577, 120, 150, 0, 0, 0, 200 ) setElementData (safeZoneRadar, "zombieProof", true) function enterZone(hitPlayer) setElementData(hitPlayer,"godMode",false) end addEventHandler( "onColShapeHit", safecol, enterZone ) function leaveZone(hitPlayer) setElementData(hitPlayer,"godMode",true) end addEventHandler( "onColShapeLeave", safecol, leaveZone )
-
Do you mean it's playing all grid list sounds at the same time?
-
addEventHandler('onClientGUIDoubleClick',root, function() if (source == gui['list']) then local row, col = guiGridListGetSelectedItem(source) if (row and col and row ~= -1 and col ~= -1) then local song = guiGridListGetItemData(source, row, col) if isElement(currentSound) then destroyElement(currentSound) end currentSound = playSound(song,false) end end end)
-
Maybe because instead of a colshape you're using getElementsByType... local hillArea = createColRectangle(arguments...) -- add hill_Enter as a handler for when a player enters the hill area function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then --if the element that entered was player --let's get the name of the player local nameOfThePlayer = getPlayerName ( thePlayer ) --announce to everyone that the player entered the hill outputChatBox ( nameOfThePlayer.." entered the zone!", getRootElement(), 255, 255, 109 ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter )
-
Cierro el tema antes de que sigan insultandose.
-
https://community.multitheftauto.com/index.php?p= ... ls&id=3666 The resource author want's it removed.
