-
Posts
2,753 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Captain Cody
-
When vehicle is jacked he has 1 minute to call 911, else he cannot. 911a = "" function vehicleExitJack ( thePlayer, seat, jacked ) if jacked then 911a[thePlayer] = true setTimer ( kill911, 60000, 1, thePlayer ) end end function kill911 (player) 911a[player] = false end addEventHandler ( "onVehicleExit", getRootElement(), vehicleExitJack ) Then use if 911a[player] == true then for the 911 command.
-
That means the element data probably is not there, or non existent. if not (targetPlayer) then outputChatBox("SYNTAX: /" .. commandName .. " [Player Partial Nick / ID] ", thePlayer, 255, 194, 14) else local targetPlayer, targetPlayerName =findPlayerByPartialNick(thePlayer, targetPlayer) if targetPlayer then local logged = getElementData(targetPlayer, "login") if (logged==1) then local wanted = tonumber(getElementData(targetPlayer,"wanted")) or 0 outputChatBox ("player have ae "..wanted..".",thePlayer) end end end end addCommandHandler("getwanted",getwanted) May work.
-
What is your function called?
-
I'm not to sure, I'll have to check it out when I get home.
-
local occupants = getVehicleOccupants(vehicle) amount = 0 for s, o in pairs(occupants) do local amounta = amount amount = amounta + 1 end if (maxPassengers > amount) then
-
"enter_passenger" will not work with setPedControlState you would just have to warp the ped into vehicle.
-
local occupants = getVehicleOccupants(vehicle) amount = 0 for s, o in pairs(occupants) do local amounta = amount amount = amounta + 1 end
-
He wants the object as far as I know, as for that it will indeed need to be modeled in. Use AddVehicleSirens to make the lights and what not actually show.
-
No problem.
-
Try to change the variable names. I've noticed a few times multiple resources conflicting some times with variable names.
-
Could either mod the vehicle, or mod the police light into an individual object and add it onto the vehicle. I'll do either or if you want.
-
On stream out check if its a car if so Freeze; On stream in, check if its a car, if so unfreeze, simple as that causes 0 lag. Dear lord. https://wiki.multitheftauto.com/wiki/OnElementStartSync https://wiki.multitheftauto.com/wiki/OnElementStopSync https://wiki.multitheftauto.com/wiki/SetElementFrozen https://wiki.multitheftauto.com/wiki/GetElementType If you need help I'll write you a code later. Laptop doesn't want to work correctly so I can't at the moment.
-
Freeze them when they stream out, when they stream in unfreeze them.
-
I mean you could do that OR; you can strike them dead with Godly powers, and lots of explosives. But this works to toggleControl ("fire", false ) toggleControl ( "aim_weapon", false ) toggleControl ("vehicle_fire", false ) toggleControl ("vehicle_secondary_fire", false ) Throw in client side script like so -Client.lua- Then throw an xml file with "Lewis" type="Script" name="Disable fightin' " /> Have a jolly day.
-
Different texture for every object using shaders.
Captain Cody replied to quindo's topic in Scripting
Use a table to define the textures, then define the shader with local and set the local shaders value, then apply it. If that makes sense. textures = {{"texturename","Something.png"},{"texturename2","Something2.png"}} for i,v in pairs (texutres) do local shader = dxCreateShader( "whatever.fx" ) local normal = dxCreateTexture("normal/"..v[2]) dxSetShaderValue(shader,"Tex0",normal) engineApplyShaderToWorldTexture(shader,v[1]) end -
Different texture for every object using shaders.
Captain Cody replied to quindo's topic in Scripting
I didn't understand a word of what you just said quind. Please state your question a bit more clearly. -
Seams my inbox was full, had it set to not allow new messages if so.
-
https://wiki.multitheftauto.com/wiki/Is ... thinMarker
-
Not sure if it works, first thing I found really.
-
Because, not all vehicles have the spoiler location defined.
-
You may have to make a table that defines the Poor, and Gangster values for each stat.
-
Poor = -- put highest value for poor here // When it changes from poor to gangster Gangster = -- put highest value for gangster here. // When it changes from gangster to hitman If stat < Poor then level = "poor" elseif stat > poor and stat < Gangster then level = "Gangster" else level = "Hitman" -- Not tested
-
Use > < and = Check if its below a certain value, above it, in middle etc.
-
You would need to use attach object with set cords and what not. Here's something I did that demonstrates that exact method. local id = 1 -- Input it here local vehicle = -- Define the vehicle here. local x,y,z = 0,0,0 -- Change to offsets that suits you best local object = createObject ( id , 0, 0,0) attachElements ( object , vehicle, x,y,z ) Xwad addvehicle upgrade wont work in this case.
-
Gta III is probably in a different format then SA.
