Jump to content

~Air

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by ~Air

  1. Hey guys, I got one problem, when one player hits a vehicle-change marker (race-gamemode) his/her wheels don't change to the bought ones. You just see the bought ones at the spawn to the next vehiclechange, that means it restores to default wheels. When the next map starts again you can see the wheels, but it will restore after a vehiclechange too. Here is my script; (I don't know what I did false here) function setWheels (wheels) local account = getPlayerAccount(source) if not isGuestAccount ( account ) then local cash = tonumber(getAccountData(account,"cash")) if cash >= 9000 or (getElementData(source, "Vip") and cash >= 4500) then local vehicle = getPedOccupiedVehicle(source) if wheels == "Shadow" then addVehicleUpgrade (vehicle,1073) setAccountData(account, "wheels", 1073) elseif wheels == "Mega" then addVehicleUpgrade (vehicle,1074) setAccountData(account, "wheels", 1074) elseif wheels == "Offroad" then addVehicleUpgrade (vehicle,1025) setAccountData(account, "wheels", 1025) elseif wheels == "Rimshine" then addVehicleUpgrade (vehicle,1075) setAccountData(account, "wheels", 1075) elseif wheels == "Wires" then addVehicleUpgrade (vehicle,1076) setAccountData(account, "wheels", 1076) elseif wheels == "Classic" then addVehicleUpgrade (vehicle,1077) setAccountData(account, "wheels", 1077) elseif wheels == "Twist" then addVehicleUpgrade (vehicle,1078) setAccountData(account, "wheels", 1078) elseif wheels == "Cutter" then addVehicleUpgrade (vehicle,1079) setAccountData(account, "wheels", 1079) elseif wheels == "Switch" then addVehicleUpgrade (vehicle,1080) setAccountData(account, "wheels", 1080) elseif wheels == "Grove" then addVehicleUpgrade (vehicle,1081) setAccountData(account, "wheels", 1081) elseif wheels == "Import" then addVehicleUpgrade (vehicle,1082) setAccountData(account, "wheels", 1082) elseif wheels == "Dollar" then addVehicleUpgrade (vehicle,1083) setAccountData(account, "wheels",1083) elseif wheels == "Trance" then addVehicleUpgrade (vehicle,1084) setAccountData(account, "wheels", 1084) elseif wheels == "Atomic" then addVehicleUpgrade (vehicle,1085) setAccountData(account, "wheels", 1085) elseif wheels == "Ahab" then addVehicleUpgrade (vehicle,1096) setAccountData(account, "wheels", 1096) elseif wheels == "Virtual" then addVehicleUpgrade (vehicle,1097) setAccountData(account, "wheels", 1097) elseif wheels == "Access" then addVehicleUpgrade (vehicle,1098) setAccountData(account, "wheels", 1098) end if getElementData(source, "Vip") == true then addStat(account, "cash", -4500) else addStat(account, "cash", -9000) end triggerClientEvent("onInfoBoxRequest", getRootElement(), true, "#FF4500W#FFFFFFheels #FF4000#00FF00bought") outputChatBox("* #FFFFFF".. getPlayerName(source).."#FFFFFF bought new wheels!", getRootElement(),0,255,0,true) else outputChatBox("* #FFFFFFYou don't have got enough money!", source, unpack(scriptcol[5])) end end end addEvent("setWheels",true) addEventHandler("setWheels",getRootElement(),setWheels) PS: Sorry for bad English
  2. ~Air

    Disable carmods

    Now I get an another error: Bad argument @getVehicleModelFromName [Expected string at argument 1, got vehicle]
  3. ~Air

    Disable carmods

    I tried this: addEventHandler("onClientResourceStart", resourceRoot, function() for i, v in ipairs(getElementsByType("vehicle")) do local vehicleID = getVehicleModelFromName ( vehicle ) engineRestoreModel ( v ) end end) But there is an error called: Bad argument @getVehicleModelFromName [Expected string at argument 1, got nil]
  4. ~Air

    Disable carmods

    I want to do it for all vehicles, it would be hard work, isn't there any option in anti-cheat or sth.?
  5. ~Air

    Disable carmods

    I think it isn't a good idea
  6. ~Air

    Disable carmods

    Hey dudes, is it able to disable carmods?
  7. I will try it later, thank you! I gonna edit the post if it worked.
  8. There are many winsounds. And the winsounds are inplented in my userpanel, GUI etc.
  9. I didn't do a code for that, because I don't know the functions how to disable the mapmusic
  10. No if someone wins a winsound is playing, but the problem is you can't hear the winsound that good because the mapmusic is so loud, thats why I want to disable the map music and when the winsound is finished to start the mapmusic again.
  11. Hey, could you tell how how ^this is possible?
  12. Hey guys, I made a script which loads wheel textures (txd's and dffs) this works perfectly. I bought a wheel from my userpanel-shop. But when I enter a vehiclechange marker the wheel isn't saved, so it becomes a random wheel. How I can fix that?
×
×
  • Create New...