Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. Et-win

    Hud problem

    removeEventHandler Though, I would use a variable to enable/disable it.
  2. What do you actually mean?
  3. function() setElementData(source,"Nitro",0) setElementData(source,"Fix",0) setElementData(source,"Colour",0) end) First rule you forgot the function his name. Also remove the ')' at the last end. But if I see the way how you script, you forgot addEventHandler?
  4. Source only works if you use it directly as the function gets runned, so with a timer, the source 'fades' away and then you can't use it anymore.
  5. You are having a function in a function, as far as I know you can't do that.
  6. You can only put 50 ms or up into a Timer. setTimer "timeInterval: The number of milliseconds that should elapse before the function is called. (the minimum is 50)(1000 milliseconds = 1 second)"
  7. Well, if you want to get it in mph or kmph then you just can use getElementSpeed... Otherwise, I don't know.
  8. What do you mean then? I (And maybe others) don't understand it out of your first post.
  9. getElementVelocity If you meant that...
  10. Et-win

    Errors..

    setTimer ( updatePlayerOnline , 60000 , 1 , source ) This should be the problem of 'getPlayerAccount' in function 'updatePlayerOnline'. When you add a timer to it, the 'player' or 'source' (In your case) is nil because he can't find it anymore.
  11. function vehicledcar() if exports.vip_system:isPlayerDonator(source) then local vehicleExists = false for placeNumber, vehicleData in ipairs(getElementsByType("vehicle")) do if (getElementData(vehicleData, "vehicleVIPFrom") == getPlayerAccount(source)) then vehicleExists = true destroyElement(vehicleData) --You can change this to blowVehicle too, if you like that more end end if (vehicleExists == true) then outputChatBox("[VIP]Your vehicle was destroyed successfully", source, 255, 255, 0, false) elseif (vehicleExists == false) then outputChatBox("[VIP]No vehicles found", source, 255, 255, 0, false) end end end addEvent( "VIPDVehicle", true ) addEventHandler( "VIPDVehicle", getRootElement(),vehicledcar )
  12. Ow ofc, dataName is already the date :facepalm:
  13. Does the function even run? Test it with outputChatBox... ( function systemrankup(dataName) outputChatBox("Test") ... )
  14. if getElementData(source, dataName) == 'Rank' or getElementData(source, dataName ) == 'Level' then
  15. Do you want to have it destroyed, and immediately spawn the new one?
  16. Didn't saw this: setTimer(function() triggerClientEvent(source, "onSpawn" , source) end, 13500, 1 ) The timer fades the source away, and that is why it's nil.
  17. addVehicleUpgrade removeVehicleUpgrade https://wiki.multitheftauto.com/wiki/Vehicle_Upgrades
  18. I'm just going to guess something, because I don't know. But try: triggerClientEvent(source, "onWasted" , getRootElement())
  19. function vehiclecar() if exports.vip_system:isPlayerDonator(source) then local vehicleExists = false for placeNumber, vehicleData in ipairs(getElementsByType("vehicle")) do if (getElementData(vehicleData, "vehicleVIPFrom") == getPlayerAccount(source)) then vehicleExists = true end end if (vehicleExists == false) then x,y,z = getElementPosition ( source ) local vehicleVIP = createVehicle ( 411, x + 3, y, z + 1 ) setElementData(vehicleVIP, "vehicleVIPFrom", getPlayerAccount(source)) outputChatBox("[VIP]Vehicle Created",source,255,255,0,false) else outputChatBox("[VIP]Your vehicle was already created", source, 255, 255, 0, false) end end end addEvent( "vehiclecar", true ) addEventHandler( "vehiclecar", getRootElement(),vehiclecar ) First check all vehicles on data "vehicleVIPFrom". If one has the account data of the client on it (Since I think the player is logged in, right?), then he will get the message he already have his vehicle created. Otherwise create the vehicle and set the account data on it from the client.
  20. What do you mean exactly?
  21. I guess if getElementData(source, dataName) == 'Rank' and getElementData(source, dataName ) == 'Level' then That ^That would be the problem. As soon as setElementData is fired, it fires onElementDataChange? So how can you check or the dataName = Rank AND Level? (I mean it gets fired by each code apart. So first for "Rank", and then "Level")
  22. Et-win

    script

    Make it yourself, or download it from https://community.multitheftauto.com/ Though, I advise you to learn to make it by yourself.
×
×
  • Create New...