Jump to content

PhantomNL

Members
  • Posts

    38
  • Joined

  • Last visited

Details

  • Gang
    Grove

PhantomNL's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Hello, I can also approve this guy, he's completely trustable and very nice, I'll just tell something about my experience of him, and post 2 pictures of that the script he made for me (I'm the guy named Selwyn), so you people can see that he actually did something. Well, as I said, this guy is someone who you can trust. He's not screwing around and has scripts done in a very short time, however, he has his own life too, so he won't be available always, of course. He made a Vehicle Delivery Script for me wich allows players on a server to deliver cars that are requested on a list. However I wanted some more features, he accepted that and made the features for no extra cost. My plans were to let Renkon make more scripts for me, but then something happened and this script was the only script wich he made for my server. I wish I could post some pictures of the script "in action" and In-Game, but I don't have Grand Theft Auto San Andreas nor Multi Theft Auto San Andreas installed anymore. Sorry about that. I do still have the script on my computer and I am willing to show you guys the folders of it so you can see it really exists, of course, I will not be showing the lines of code! Lol, I forgot how to properly upload images on here, so I'll just paste a link here so you can see there!: http://imgur.com/tAAspev,UFDt6yh#0
  2. You are getting this wrong, if you want to put in a custom skin, you have to make a script for it, there are no default skin ID's made for any downloaded skins. You have to overwrite them with an existing skin ID yourself. This script is used to replace skins (ped skins, vehicle skins, and weapon skins.) This script replacing skin number 7 with Franklin from Grand Theft Auto 5: function replaceModel() txd = engineLoadTXD("Franklin.txd", 7 ) engineImportTXD(txd, 7) dff = engineLoadDFF("Franklin.dff", 7 ) engineReplaceModel(dff, 7) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) "Phantom" version="1.0" type="script"/> I'll explain it a bit; As you can see in the meta file, it will use 'Franklin.lua' script to work. You can also see, that there are 2 other files linked, wich are both called 'Franklin'. 1 .txd file, and 1 .dff file. Those are both needed to replace the skin. Now let's take a look at the script itself; You can see, again, that the script will use the 2 files. Behind that, you can see a '7', in this script. This indicates the existing MTA skin ID, wich is skin 7. You can add in any number you want, but it's smart that if you downloaded a woman skin, you would replace it with an existing woman skin. I hope this helps you further, I am not very good in explaining these kinda things, but if you need more help, I'll try and explain better (; You will need these pages to replace stuff: Ped Skin ID's: https://wiki.multitheftauto.com/wiki/All_Skins_Page Vehicle Skin ID's: https://wiki.multitheftauto.com/wiki/Vehicle_IDs Weapon Skin ID's: https://wiki.multitheftauto.com/wiki/Weapons <--- 'Model ID' is the one you need, not 'ID'! I hope this helped you further, if you already knew this by now, then I won't be posting any things anymore here! (; Good luck!
  3. function destroyOnExplode () if setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode) Like this? By the way, I meant that I understood the part of the 'if' statement.
  4. I do know what you mean, but I have no idea where to exactly place the 'if' statement.. function destroyOnExplode () setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode)
  5. That script doesn't seem to work, gives this error in the console: WARNING: [gameplay]/WS/ws.lua:25: Bad argument @ 'giveWeapon' [Expected number at argument 3, got table]
  6. Exactly, the exploded vehicles does not disappear by default, you have other script destroyed the vehicle and that why it did not respawn and show you the error. Then I think this script does that, it's a vehicle script so people can buy cars and spawn their cars whenever they want (server side lua of the script): carShopMarker = createMarker (2133.59,-1149.29, 23.3, "cylinder", 3, 255, 0, 0, 127) carShopMarker2 = createMarker (562, -1270, 16, "cylinder", 2, 255, 0, 0, 127) carShopMarker3 = createMarker (-1954,299,34,"cylinder",2,255,0,0,127) carShopMarker4 = createMarker (-1663,1208,6,"cylinder",2,255,0,0,127) carShopMarker5 = createMarker (1946,2068,10,"cylinder",2,255,0,0,127) createBlipAttachedTo(carShopMarker,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker2,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker3,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker4,55,2,0,255,0,0,0,200) createBlipAttachedTo(carShopMarker5,55,2,0,255,0,0,0,200) addEvent ("viewGUI", true) function markerHit (hitPlayer, matchingDimension) if (source == carShopMarker) or (source == carShopMarker2) or (source == carShopMarker3) or (source == carShopMarker4) or (source == carShopMarker5) then triggerClientEvent ("viewGUI", hitPlayer) end end addEventHandler ("onMarkerHit", getRootElement(), markerHit) addEvent ("carShopCarBuy", true) addEventHandler ("carShopCarBuy", getRootElement(), function(id, cost, name) if (getPlayerMoney (source) >= tonumber(cost)) then outputChatBox ("Bought a " .. name, source, 255, 0, 0, false) outputChatBox ("ID: " .. id, source, 255, 0, 0, false) outputChatBox ("Cost: " .. cost, source, 255, 0, 0, false) takePlayerMoney (source, tonumber (cost)) setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id)) setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3) setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0) else outputChatBox ("You are too poor!", source, 255, 0, 0, false) end end) addEvent ("carSpawn", true) addEvent ("carDestroy", true) function carSpawn () if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then if (getElementData (source, "carSpawnTime") > 0) then outputChatBox("Please wait "..tostring(getElementData(source, "carSpawnTime")).." seconds before you respawn your car.", source) return end if (getPlayerMoney (source) < 1000) then outputChatBox("You need to have atleast $1000 to spawn your car", source) return end setElementVelocity (getElementData (source, "hisCar"), 0,0,0) local x,y,z = getElementPosition (source) setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0) setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1) outputChatBox ("Car spawned.", source, 255, 0, 0) setElementData (source, "carSpawnTime", 600) takePlayerMoney(source, 1000) elseif not (getElementData (source, "hisCar")) then local accountData = getAccountData (getPlayerAccount (source), "funmodev2-car") if (accountData) then if (getElementData (source, "carSpawnTime") > 0) then outputChatBox("Please wait "..tostring(getElementData(source, "carSpawnTime")).." seconds before you respawn your car.", source) return end if (getPlayerMoney (source) < 1000) then outputChatBox("You need to have atleast $1000 to spawn your car", source) return end carID = getAccountData (getPlayerAccount (source), "funmodev2-car") x,y,z = getElementPosition (source) vehicle = createVehicle (carID, x +2, y, z +1) setElementID (vehicle, getAccountName (getPlayerAccount(source))) setElementData (source, "hisCar", vehicle) outputChatBox ("Car spawned.", source, 255, 0, 0) setElementData (source, "carSpawnTime", 600) takePlayerMoney(source, 1000) if (getAccountData (getPlayerAccount(source), "funmodev2-carupg")) then local upgrades = nil local upgrades = {} local upgrades = getAccountData (getPlayerAccount(source), "funmodev2-carupg") for i,v in ipairs (upgrades) do addVehicleUpgrade (vehicle, v) end end if (getAccountData (getPlayerAccount(source), "funmodev2-paintjob")) then local paintjob = getAccountData (getPlayerAccount(source), "funmodev2-paintjob") setVehiclePaintjob (vehicle, paintjob) end if (getAccountData (getPlayerAccount(source), "funmodev2-carcolor1")) and (getAccountData (getPlayerAccount(source), "funmodev2-carcolor2")) then local c1 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor1") local c2 = getAccountData (getPlayerAccount(source), "funmodev2-carcolor2") setVehicleColor (vehicle, c1,c2,0,0) end else outputChatBox ("You haven't got a car.", source, 255, 0, 0) end else outputChatBox ("You're already in a car!", source, 255, 0, 0) end end end addEventHandler ("carSpawn", getRootElement(), carSpawn) function carDestroy () if not (isGuestAccount (getPlayerAccount (source))) then if (isPedInVehicle (source)) then if (getElementID(getPedOccupiedVehicle(source)) == getAccountName (getPlayerAccount(source))) then setElementHealth (getElementData (source, "hisCar"), 0) destroyElement (getPedOccupiedVehicle (source)) removeElementData (source, "hisCar") outputChatBox ("Car Destroyed.", source, 255, 0, 0) else outputChatBox ("This not your car!", source, 255, 0, 0) end elseif (not (isPedInVehicle (source))) and (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) then car=getElementData(source, "hisCar") destroyElement(car) outputChatBox ("Car Destroyed.", source, 255, 0, 0) removeElementData (source, "hisCar") end end end addEventHandler ("carDestroy", getRootElement(), carDestroy) function engineSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Vehicle shutted down.", source, 255, 0, 0) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Vehicle started.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("engenieSwitch",true) addEventHandler("engenieSwitch",getRootElement(),engineSwitch) function lightsSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleOverrideLights(veh) ~= 2) then setVehicleOverrideLights(veh, 2) outputChatBox ("Vehicle lights turned on.", source, 255, 0, 0) elseif (getVehicleOverrideLights(veh) ~= 1) then setVehicleOverrideLights(veh, 1) outputChatBox ("Vehicle lights turned off.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lightsSwitch",true) addEventHandler("lightsSwitch",getRootElement(),lightsSwitch) function lockSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if not (isVehicleLocked (veh)) then setVehicleLocked (veh, true) setVehicleDoorsUndamageable (veh, true) setVehicleDoorState (veh, 0, 0) setVehicleDoorState (veh, 1, 0) setVehicleDoorState (veh, 2, 0) setVehicleDoorState (veh, 3, 0) outputChatBox ("Vehicle locked.", source, 255, 0, 0) elseif (isVehicleLocked (veh)) then setVehicleLocked (veh, false) setVehicleDoorsUndamageable (veh, false) outputChatBox ("Vehicle unlocked.", source, 255, 0, 0) end else outputChatBox ("You aren't in a vehicle!", source, 255, 0, 0) end end addEvent("lockSwitch",true) addEventHandler("lockSwitch",getRootElement(),lockSwitch ) addEventHandler ("onVehicleStartEnter", getRootElement(), function(player, seat, jacked, door) if (isVehicleLocked (source) == true) then local mannetjeNaam = getAccountName (getPlayerAccount (player)) local autoNaam = getElementID (source) if (mannetjeNaam == autoNaam) then setVehicleLocked (source, false) outputChatBox ("Vehicle unlocked!", player, 255, 0, 0, false) end end end) addEventHandler ("onVehicleExplode", getRootElement(), function() local theOwner = getAccountName (getPlayerAccount(getPlayerFromName (getElementID (source)))) if (theOwner) then removeElementData (theOwner, "hisCar") end end) addEventHandler ("onPlayerQuit", getRootElement(), function(quitType, reason, responsibleElement) if (getElementData (source, "hisCar")) then blowVehicle (getElementData (source, "hisCar")) removeElementData (source, "hisCar") end end) addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ), function () for i,v in ipairs (getElementsByType ("player")) do if (getElementData (v, "hisCar")) then setElementHealth (getElementData (v, "hisCar"), 0) removeElementData (v, "hisCar") end end end ) function destroyOnExplode () setTimer (destroyElement, 2500, 1, source) end addEventHandler ("onVehicleExplode", getRootElement(), destroyOnExplode) Thanks ALOT for helping me out! I removed that script, and now it works! Although now I need to figure out how to have both resources to run together I will come back here if I need help, but I'm gonna try myself first Again, thanks alot! PhantomNL
  7. The exploded vehicle (black leftovers) just disappear, no vehicle coming back at the place, what do you mean with "you must have something else destroyed the vehicle before it respawned?" I just start the resource, search for a car, shoot it down, let it explode, and wait.. I also tried to switch gamemodes, doesn't work.
  8. Yeah man it's server side, I don't know what you mean with "you also named your function with a MTA function name: change it."
  9. Still the same error man, sorry: WARNING: [gameplay]/vehiclerespawn/explode.lua:2 Bad 'element' pointer @ 'respawnVehicle'(1)
  10. Hi, I've got this script, and it worked fine, until yesterday, it doesn't respawn the exploded vehicles anymore.. This is the script: function respawnExplodedVehicle() setTimer( respawnExplodedVehicle, 5000, 1, source ) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle) And this is the script without any changes (it will give errors in the console when it's this, the problem is at line 2): function respawnVehicle() setTimer( respawnVehicle, 5000, 1, source ) end addEventHandler("onVehicleExplode", getRootElement(), respawnExplodedVehicle) This is the error if it's the second one: [gameplay]/vehiclerespawn/explode.lua:2 Bad 'element' pointer @ 'respawnVehicle'(1) So I don't know what to do now since my knowledge for .lua is not that good, however this might be a simple problem.. Thanks
  11. Cool, I'm going to try it out, thanks alot!
  12. I tried putting a wall in front of it, but then players can just walk through the wall.. I also tried to look up the object that should fit right in it, (wich belongs there), but didn't find it.. I don't really know what you mean with 'the code', the object ID? But thanks alot, for even responding, as I really don't know what could be causing this annoying bug, I also didn't ever try to expand or do anything different with the Crack Palace.
  13. PhantomNL

    Crack Palace Bug?

    Hi guys, so I've got an MTA server, and I noticed that Big Smoke's Crack Palace is kinda.. bugging.. There is no entrance, just some bugged graphics, I tried to start the resource 'interiors', but that doesn't seem to have any effects. Is there a way to fix this? I have no idea when this has started to be bugging, but it's there for quite a while now.. And it's quite annoying as people can fall out of the world or go into the void with a Jetpack.. What it looks like: http://imgur.com/7hE0zty
×
×
  • Create New...