-
Posts
1,390 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Et-win
-
removeEventHandler Though, I would use a variable to enable/disable it.
-
What do you actually mean?
-
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?
-
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.
-
You are having a function in a function, as far as I know you can't do that.
-
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)"
-
Well, if you want to get it in mph or kmph then you just can use getElementSpeed... Otherwise, I don't know.
-
What do you mean then? I (And maybe others) don't understand it out of your first post.
-
getElementVelocity If you meant that...
-
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.
-
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 )
-
Ow ofc, dataName is already the date :facepalm:
-
Does the function even run? Test it with outputChatBox... ( function systemrankup(dataName) outputChatBox("Test") ... )
-
if getElementData(source, dataName) == 'Rank' or getElementData(source, dataName ) == 'Level' then
-
Do you want to have it destroyed, and immediately spawn the new one?
-
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.
-
addVehicleUpgrade removeVehicleUpgrade https://wiki.multitheftauto.com/wiki/Vehicle_Upgrades
-
I'm just going to guess something, because I don't know. But try: triggerClientEvent(source, "onWasted" , getRootElement())
-
Edited my code.
-
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.
-
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")
-
Make it yourself, or download it from https://community.multitheftauto.com/ Though, I advise you to learn to make it by yourself.
-
[PAID] Who wants to share his multigamemode with me
Et-win replied to maikel2442's topic in Resources
Of course he won't.
