Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Gravity gun

    Haha, nice one, keep the good work
  2. so with that check, won't show for the local player, right? ( i suposed was like this )
  3. Castillo

    Groups help

    spawnTeam = createTeam ("Teamname", 255, 0, 0) -- Create team to spawn. function spawnOnLogin (prevA, curA, autoLogin) outputChatBox ("Welcome to ...", source, 255, 0, 0, false) spawnPlayer (source, 0, 0, 5, 0, math.random (0,288), 0, 0, spawnTeam) -- spawns player with random skin fadeCamera (source, true) setCameraTarget (source, source) end addEventHandler("onPlayerLogin", getRootElement(), spawnOnLogin) math.random (0,288), that's the skin.
  4. Castillo

    Groups help

    I'm looking for someone able to give me infinite money, but nobody will, we don't support request, learn how to script by yourself. https://wiki.multitheftauto.com/wiki/Scr ... troduction
  5. that's not right, if i'm right every should see them, and about that you shouldn't see yours, there is a way but i don't know it.
  6. You can't move the default health bars, name, you must create your own using DX drawing functions. https://wiki.multitheftauto.com/wiki/Cli ... _functions
  7. proracer, you can use functions outside an event, didn't you know?
  8. also use, setElementModel(playerWhoUses,280) because setPlayerSkin it's old already
  9. Castillo

    .

    So? i'm not English too, i'm argentinian but i've learned english to learn how to script.
  10. Castillo

    .

    Well, then start learning how to?
  11. I don't need your help. . . Aspect other scripters. In my posts not to answer please. Hahaha, aiboforcen it's a good member that helps everyone, your problem is that you don't understand him, maybe because of your shity english
  12. Castillo

    Help me plis!

    What? who you think you are? you should at least ask it nicely, also post the code here, do you think someone will waste his time downloading it?
  13. Castillo

    Matrix

    I think i know what does he mean, he wants a wide screen, that should mean 2 images or 2 rectangles in top of screen and bottom.
  14. Suspended - Ransom
  15. I'm not sure of what are you trying to say, but getResourceState includes many states, such as: loaded, starting. So i don't really get what do you mean.
  16. WHAT?! i don't get anything now
  17. What do you mean? O_o
  18. proracer, he doesn't even want to learn i'm guessing, since he said "i hate scripts"
  19. function setBinds() end function setBindsTwo() local players = getElementsByType("player") for k, v in ipairs(players) do bindKey(v, "p", "down", delayedEMToggle) end end addEventHandler("onPlayerJoin", getRootElement(), setBinds) addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setBindsTwo) function toggleVehicleLights(ply, key, state) local vehicle = getPedOccupiedVehicle(ply) if vehicle then if getVehicleOverrideLights(vehicle) ~= 2 then setVehicleOverrideLights(vehicle, 2) else setVehicleOverrideLights(vehicle, 1) end end end allowedIDS = {520 = true, 438 = true} function delayedEMToggle(ply, key, state) veh = getPedOccupiedVehicle(ply) model = getElementModel(veh) then if allowedIDS[model] then setTimer(toggleEmergencyLights, 200, 1, ply, key, state) end end local colorTimers = {} local stroboTimers = {} function toggleEmergencyLights(ply, key, state) local vehicle = getPedOccupiedVehicle(ply) if not vehicle then return end if colorTimers[tostring(vehicle)] == nil and stroboTimers[tostring(vehicle)] == nil then -- start timers to flash lights with colors -- 1. timer to change color AND left/right simultaneously -> left = blue, right = red -- 2. timer to flash on/off in a strobo fashion colorTimers[tostring(vehicle)] = setTimer(sirenColorTick, 900, 0, vehicle) stroboTimers[tostring(vehicle)] = setTimer(sirenStroboTick, 90, 0, vehicle) elseif colorTimers[tostring(vehicle)] ~= nil and stroboTimers[tostring(vehicle)] ~= nil then -- stop timers, clear light colors and statuses killTimer(colorTimers[tostring(vehicle)]) killTimer(stroboTimers[tostring(vehicle)]) colorTimers[tostring(vehicle)] = nil stroboTimers[tostring(vehicle)] = nil setVehicleHeadLightColor(vehicle, 255, 255, 255) setVehicleOverrideLights(vehicle, 2) setVehicleLightState(vehicle, 0, 0) setVehicleLightState(vehicle, 1, 0) end end function sirenColorTick(vehicle) local r, g, b = getVehicleHeadLightColor(vehicle) if g > 0 or b > 0 then setVehicleHeadLightColor(vehicle, 255, 0, 0) setVehicleLightState(vehicle, 0, 0) setVehicleLightState(vehicle, 1, 1) elseif r > 0 then setVehicleHeadLightColor(vehicle, 0, 0, 255) setVehicleLightState(vehicle, 0, 1) setVehicleLightState(vehicle, 1, 0) end end function sirenStroboTick(vehicle) if getVehicleOverrideLights(vehicle) == 2 or getVehicleOverrideLights(vehicle) == 0 then setVehicleOverrideLights(vehicle, 1) else setVehicleOverrideLights(vehicle, 2) end end
  20. 1. Make a table with the ID's you want only. 2. When going to activate the lights, check if the vehicle id it's on that table. 3. You are done, and should work fine. Example: allowedIDS = {520 = true, 438 = true} and so on. then to check just do: model = getElementModel(your element) then if allowedIDS[model] then
  21. That script must be "interiors" resource default with MTA, you just start the resource "Interiors" and should get it.
  22. I'm not using this compiler, but i use another i found on the net, you can download it by this link (i uploaded it to mediafire) http://www.mediafire.com/?08ul44zogde48s5
  23. Castillo

    Scripter

    What kind of Roleplay does your friend want?
  24. Because you don't have the mysql module loaded i guess. https://wiki.multitheftauto.com/wiki/Mysql
  25. Well, i have the same problem actually, maybe is not working that part?
×
×
  • Create New...