Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You can't put anything as function name, this has some errors. fly = createMaker(1686,-2434,14,"cylinder",1.5,0,255,0) createBlipAttachedTo(fly,41) function maker(player,matchingDimension) if source == fly and getElementType(player) == "player" then setElementPosition(player,1688,-2425,14) end end addEventHandler("onMakerHit",getRootElement(),maker) try that.
  2. Castillo

    help

    Are you kidding us? we aren't bots that scripts, use your time to learn by yourself. https://wiki.multitheftauto.com/
  3. check in meta.xml, GUI elements are only client side, so should appear type="client"
  4. to set the camera back on player should be like this: setCameraTarget(getLocalPlayer(),getLocalPlayer()) And others i don't really know, never happend to me. Edit: I have the same problem with dimensions o_o
  5. You got the 2 functions for SAVE not LOAD.
  6. WHAT YOU ARE DOING IS A MESS, you got the function to save them but now you need to make the one that LOADS THE CLOTHES.
  7. is that a joke proracer? you got different functions for the same thing
  8. What you doing doesn't makes any sense.
  9. OMFG you are stupid or what? he told you to change getPedClothe to getPedClothes
  10. If your script has errors, you won't be able to compile it, so i would recommend to use /debugscript 3 and check if outputs any error.
  11. Uhm, if you got the mysql database already then configure it all on settings.xml
  12. I do, but i'm lazy to help someone right now
  13. To run MTA-PARADISE game mode you need a mysql table, along with the mysql module which you can get it here: https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL
  14. Yeah, well that's another thing i was thinking.
  15. That doesn't makes any sense. function onPlayerQuitSaveClothes() local playeracc = getPlayerAccount(thePlayer) if acc then for i=0,17 do local texture, model = getPedClothes" class="kw2">getPedClothes(thePlayer) if texture and model then setAccountData(acc, "clothes." .. tostring(i) .. ".texture", texture) setAccountData(acc, "clothes." .. tostring(i) .. ".model", model) end end end end addEventHandler("onPlayerQuit", root, onPlayerQuitSaveClothes)
  16. On mine, works all fine, when i freeze the time it works fine.
  17. Wasn't just that, you had other bugs on the script.
  18. So what? i have many public resources, but they aren't a whole game mode or so on.
  19. Castillo

    MTA Orange release?

    I'm not idiot, and i have seen that trailer before, but if Zango, Towncivilian says there isn't, means there isn't.
  20. CHECK THE WIKI ARGUMENTS FOR addPedClothes, it requires 4 arguments: bool addPedClothes ( ped thePed, string clothesTexture, string clothesModel, int clothesType )
  21. This had lot of errors that you could have fixed, --client side cooldown = 0 cooldownTimer = nil localPlayer = getLocalPlayer() --function isPD() -- return exports.factions:isPlayerInFaction( localPlayer, 1 ) --end function switchMode() if (getPedWeapon(localPlayer)==24) and (getPedTotalAmmo(localPlayer)>0) then -- has ammo local mode = getElementData(localPlayer, "deaglemode") if mode == 0 then -- tazer mode triggerServerEvent("deaglemode", localPlayer, localPlayer, 1) outputChatBox( "You switched your weapon mode to lethal.", 0, 255, 0 ) elseif mode == 1 -- and isPD() then -- lethal mode outputChatBox( "You switched your weapon to radar gun.", 0, 255, 0 ) triggerServerEvent("deaglemode", localPlayer, localPlayer, 2) elseif mode == 2 or mode == 1 then -- radar gun mode outputChatBox( "You switched your weapon to taser.", 0, 255, 0 ) triggerServerEvent("deaglemode", localPlayer, localPlayer, 0) end end end function bindKeys(res) bindKey("n", "down", switchMode) local mode = getElementData(localPlayer, "deaglemode") if not (mode) then triggerServerEvent("deaglemode", localPlayer, localPlayer, 0) end end addEventHandler("onClientResourceStart", getResourceRootElement(), bindKeys) function enableCooldown() cooldown = 1 cooldownTimer = setTimer(disableCooldown, 3000, 1) toggleControl("fire", false) setElementData(getLocalPlayer(), "deagle:reload", true) end function disableCooldown() cooldown = 0 toggleControl("fire", true) setElementData(getLocalPlayer(), "deagle:reload", false) if (cooldownTimer~=nil) then killTimer(cooldownTimer) cooldownTimer = nil end end addEventHandler("onClientPlayerWeaponSwitch", getRootElement(), disableCooldown) function weaponFire(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement) if (weapon==24) then -- deagle local mode = getElementData(localPlayer, "deaglemode") if (mode==0) then -- tazer mode enableCooldown() local px, py, pz = getElementPosition(localPlayer) local distance = getDistanceBetweenPoints3D(hitX, hitY, hitZ, px, py, pz) if (distance<35) then fxAddSparks(hitX, hitY, hitZ, 1, 1, 1, 1, 10, 0, 0, 0, true, 3, 1) end playSoundFrontEnd(38) triggerServerEvent("tazerFired", localPlayer, hitX, hitY, hitZ, hitElement) end end end addEventHandler("onClientPlayerWeaponFire", localPlayer, weaponFire) function weaponAim(target) if (target) then if (getElementType(target)=="vehicle") then if (getPedWeapon(localPlayer)==24) then local mode = getElementData(localPlayer, "deaglemode") if (mode==2) then actualspeed = exports.global:getVehicleVelocity(target) outputChatBox(getVehicleName(target) .. " clocked in at " .. actualspeed .. " km/h.", 255, 194, 14) end end end end end addEventHandler("onClientPlayerTarget", getRootElement(), weaponAim) -- code for the target/tazed person function cancelTazerDamage(attacker, weapon, bodypart, loss) if (weapon==24) then -- deagle local mode = getElementData(attacker, "deaglemode") if (mode==0 or mode==2) then -- tazer mode / radar gun mode cancelEvent() end end end addEventHandler("onClientPlayerDamage", localPlayer, cancelTazerDamage) function showTazerEffect(x, y, z) fxAddSparks(x, y, z, 1, 1, 1, 1, 100, 0, 0, 0, true, 3, 2) playSoundFrontEnd(38) end addEvent("showTazerEffect", true ) addEventHandler("showTazerEffect", getRootElement(), showTazerEffect) local underfire = false local fireelement = nil local localPlayer = getLocalPlayer() local originalRot = 0 local shotsfired = 0 function onTargetPDPed(element) if (isElement(element)) then if (getElementType(element)=="ped") and (getElementModel(element)==282 or getElementModel(element)==280 or getElementModel(element)==285) and not (underfire) and (getControlState("aim_weapon")) then underfire = true fireelement = element originalRot = getPedRotation(element) addEventHandler("onClientRender", getRootElement(), makeCopFireOnPlayer) addEventHandler("onClientPlayerWasted", getLocalPlayer(), onDeath) end end end addEventHandler("onClientPlayerTarget", getLocalPlayer(), onTargetPDPed) function makeCopFireOnPlayer() if (underfire) and (fireelement) then local rot = getPedRotation(localPlayer) local x, y, z = getPedBonePosition(localPlayer, 7) setPedRotation(fireelement, rot - 180) setPedControlState(fireelement, "aim_weapon", true) setPedAimTarget(fireelement, x, y, z) setPedControlState(fireelement, "fire", true) shotsfired = shotsfired + 1 -- if (shotsfired>40) then -- triggerServerEvent("killmebyped", getLocalPlayer(), fireelement) -- end end end function onDeath() if (fireelement) and (underfire) then setPedControlState(fireelement, "aim_weapon", false) setPedControlState(fireelement, "fire", false) setPedRotation(fireelement, originalRot) fireelement = nil underfire = false removeEventHandler("onClientRender", getRootElement(), makeCopFireOnPlayer) removeEventHandler("onClientPlayerWasted", getLocalPlayer(), onDeath) end end --server side local time = 10 --In seconds, time, when player is frozen function deaglemodes(localPlayer, number) local mode = tonumber(number) if mode == 0 then --tazer setElementData(localPlayer,"deaglemode", 0) elseif mode == 1 then --leathal setElementData(localPlayer,"deaglemode", 1) elseif mode ==2 then --radar setElementData(localPlayer,"deaglemode", 2) end end addEvent("deaglemode", true) addEventHandler("deaglemode", getRootElement(), deaglemodes) function tazerShot(hitX, hitY, hitZ, hitElement) setPedFrozen ( source, true ) setPedAnimation( source, "ped", "FLOOR_hit_f") setTimer(setPedFrozen, time * 1000, 1, source, false) setTimer(setPedAnimation, time * 1000, 1, source) end addEvent("tazerFired", true) addEventHandler("tazerFired", getRootElement(), tazerShot, hitX, hitY, hitZ, hitElement) function killmebyped(target) --killed by ped blahhhh end P.S: Next time ask it better, because that's not the way to ask for help.
  22. Castillo

    Skins Remove

    lol? skins? i don't get him.
  23. Castillo

    MTA Orange release?

    OMFG! he already told you THERE ISN'T ANY MTA:IV! stop asking the f** same question.
  24. Yeah, but this guy doesn't understands anything
  25. Are you blind AcitanoX? clothes = getPedClothes(source,"PlayerClothes") "PlayerClothes"? WTF? https://wiki.multitheftauto.com/wiki/GetPedClothes this requires a type of clothes, types: * 0: SHIRT * 1: HEAD * 2: TROUSERS * 3: SHOES * 4: TATTOOS_LEFT_UPPER_ARM * 5: TATTOOS_LEFT_LOWER_ARM * 6: TATTOOS_RIGHT_UPPER_ARM * 7: TATTOOS_RIGHT_LOWER_ARM * 8: TATTOOS_BACK * 9: TATTOOS_LEFT_CHEST * 10: TATTOOS_RIGHT_CHEST * 11: TATTOOS_STOMACH * 12: TATTOOS_LOWER_BACK * 13: NECKLACE * 14: WATCH * 15: GLASSES * 16: HAT * 17: EXTRA so should be: function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then clothes = getPedClothes" class="kw2">getPedClothes(source,1) setAccountData ( playeraccount, "play.clothes.head", playerclothes ) end end addEventHandler("onPlayerQuit",getRootElement(),onPlayerQuit) and to load it when login do: addPedClothes: https://wiki.multitheftauto.com/wiki/AddPedClothes
×
×
  • Create New...