Vinctus
Members-
Posts
43 -
Joined
-
Last visited
Everything posted by Vinctus
-
https://wiki.multitheftauto.com/wiki/Scr ... troduction
-
make the type as "server" on first one, try after that <meta> <script src="countdownC.lua" type="client" /> <script src="countdownS.lua" type="server" /> <file src="images/1.png" /> <file src="images/2.png" /> <file src="images/3.png" /> <file src="images/go.png" /> <file src="go.mp3" /> <file src="tick.mp3" /> <export function="startCountDown" type="server" /> <export function="startCountDown" type="client" /> </meta> what is the clientside for anyway?
-
setElementFrozen(theguy, false)
-
replace isWindowOpen with isElement
-
attach element data on the player once he done X thing then check if he has elem data when he opens the gui, if he has, disable the button or if you want to use accountData, make the check via server side event
-
regarding the oxygen problem, make the text show math.ceil(current oxygen / 100) other than that, looks pretty nice - loving the GRO theme
-
https://forum.multitheftauto.com/viewtopic.php?f=91&t=39795
-
onPlayerWasted call playerSpawn func for the guy who died lol also think u need to getTeamFromName() to get the team element
-
local myMods = { -- file name, replaces {"filename",411}, } addEventHandler("onClientResourceStart", resourceRoot, function() for _,theMod in ipairs(myMods) do local file = theMod[1] local id = theMod[2] local txd = engineLoadTXD (file .. ".txd" ) engineImportTXD ( txd, id ) local dff = engineLoadDFF (file .. ".dff", id ) engineReplaceModel ( dff, id ) end end) if you are going to have multiple mods, use this.. easier than the engineLoad stuff 500 times.
-
Reading the wiki doesn't make you any better scripter, you has to understand what you are doing as well
-
also I recommend using SQL for the stats instead of account data, easier to clear it all if needed by dropping the table etc
-
wiki.multitheftauto.com/wiki/Scripting_Introduction
-
make sure to check it's not empty vehicle (that there is someone driving) or players can abuse it by shooting at their vehicle and then repairing it
-
create the vehicle to another dimension and set player's camera to it then, if he cancels the spawning or spawns the vehicle, destroy the preview one, set players camera back to the player and spawn the vehicle.
-
"ERROR: Couldn't find file skins/13.txd" you are missing a .txd file or you don't have it on the correct folder -- it must be in zombies/skins folder.
-
If it's for like test-driving, send the player to another dimension and spawn the car there. That would be in my opinion the easiest way, although you can do what the guy above me said
-
Also, always color vehicles server-sided - coloring it clientside will only show the color to you. However, sometimes coloring clientside is a good thing - like preview of modshop vehicle colors for example.
-
cancelling the onVehicleStartEnter is more efficient as it blocks it as soon as you press the key to enter the vehicle
-
Why would you want that?
-
here's an example: addEventHandler("onVehicleStartEnter", root, function(enteringPlayer, seat) if enteringPlayer and seat == 0 then -- if he tries to enter driver seat if not getElementData(enteringPlayer, "police") then cancelEvent() end end end) or whatever you use to check if he is police
-
don't you have on extra 'end' at the end of the script?
-
http://lua-users.org/wiki/StringLibraryTutorial try here
-
Now you should