meh
Members-
Posts
125 -
Joined
-
Last visited
Everything posted by meh
-
does it mean that you're fee now? if so, i'd like to c u in my team.
-
send me too. un3x will probably be happy to play on a map of an old bud. if ur from that epd that i'm thinking about, ofc.
-
whoa, man. ur so mature. you can count lousy and (claim to) know so much about this life. i'm jealous. can i take classes from you or something?
-
haha, i see this is the most popular answer in the scripting section these days. where may i suggest to rename the section to "we will not do it for you"?
-
okay, guys, thanx i got this. now another question. i'm still trying to create a map with random vehicle chage pick up. so used this code: local randomPickup_vehicleID = 513 -- this is the stuntplane's vehicleID. when you place a stuntplane vehiclechange pickup, then it will give you a random vehicle instead of stuntplane. if not stuntplane, write some other vehicleID here local randomVehicleIDS = { 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503 } -- these are the random vehicle ids. when you hit the random vehicle pickup, it gives you one of these vehicles. addEvent("onPlayerPickUpRacePickup", true) addEventHandler("onPlayerPickUpRacePickup", getRootElement(), function(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" and vehicleModel == randomPickup_vehicleID then setElementModel(getPedOccupiedVehicle(source), randomVehicleIDS[math.random(1, #randomVehicleIDS)]) end end ) and i did put a stuntplane vehicle change pickup. but it still doesn't work. do i need to use some additional files\scripts\etc apart from random.map, meta.xml and script.lua? this is how meta looks like btw: <meta> <info gamemodes="race" type="map" name="Lucky luc" author="meh" version="1.0.0" description="wtf"></info> <map src="random.map" dimension="0"></map> <settings> <script src="server.lua" type="server" /> <setting name="#minplayers" value="[ 0 ]"></setting> <setting name="#maxplayers" value="[ 128 ]"></setting> <setting name="#gravity" value="[ 0.008000 ]"></setting> <setting name="#weather" value="[ 0 ]"></setting> <setting name="#time" value="12:0"></setting> <setting name="#locked_time" value="[ false ]"></setting> <setting name="#waveheight" value="[ 0 ]"></setting> <setting name="#gamespeed" value="[ 1 ]"></setting> </settings> </meta>
-
ah, you know better than me that there's no such thing as perfection in this world.
-
do not tell for everyone. your point of view is just your point of view. It is a point of view of 99,9% of the scripters. still, it's not everyone. plus, in order to prove it, one gotta bring in 99.9 % of the world's scripters to this thread, and every single one of them must say that gtx said.
-
thanx for the advice, but this won't do. if you watch those videos a few more times. you'll notice that (in the first vid) the same checkpoint gives different vehicles to players and (i the second vid) there're no checkpoints at all, since it's a dd map. and as we all know dd maps and checkpoints don't really work all that great together. so i need a script. and i got it already from karthik184. know i'm curious how to use it. he said i gotta use it in serverside code. what's that and how do i use it? ty 4 help.
-
do not tell for everyone. your point of view is just your point of view.
-
sry for a retarded question, i'm still new, but how do i use this script?
-
which means that had just enough time to fix all the issues. amirite?
-
shit, i always forget to mention that i mean race mode ! yes, you're totally right, Solidsnake.
-
thanx a million guys, now everything works just great. and i've 1 more question. this one is my last(i hope). is it possible to make the command /lights 1 last for the whole session, and not for 1 round only? because as for now, a player has to type /lights 1 each round and it's kind of uncomfortable imo.
-
sure. it's DrakeN's script: local tVehicles = -- what draken was saying is, its alot easier to find and edit it now, the code looks more organized too. { [ 598 ] = true; [ 596 ] = true; [ 597 ] = true; [ 411 ] = true; [ 599 ] = true; } -- Simple Police-Lights by MuLTi! p_lights = {} p_timer = {} p_lvar = {} p_pvar = {} p_lvar2 = {} p_lvar3 = {} p_lvar4 = {} function toggleLights(thePlayer, cmd, level) local level = tonumber(level) if not(level) then outputChatBox("#FF0000 Please select a level![1-2]", thePlayer, 255, 255, 255, true) return end if(level < 1) or (level > 2) then outputChatBox("#FF0000 Please select a level between 1-2!", thePlayer, 255, 255, 255, true) return end local veh = getPedOccupiedVehicle(thePlayer) local id = getElementModel(veh) if ( tVehicles [ getPedOccupiedVehicle ( thePlayer ) ] ) then if(level == 1) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_pvar[veh] = 1 p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end elseif(level == 2) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar3[veh] == 4) then setTimer(function() p_lvar3[veh] = 0 end, 1000, 1) setTimer( function() if(p_lvar4[veh] == 1)then p_lvar4[veh] = 0 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 77, 77, 255) else setVehicleLightState ( veh, 3, 0) ш setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 77, 77) p_lvar4[veh] = 1 end end, 50, 5) return end if(p_lvar2[veh] == 0) or (p_lvar2[veh] == nil) then p_lvar2[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar2[veh] = 0 end if(p_lvar3[veh] == nil) then p_lvar3[veh] = 0 end p_lvar3[veh] = (p_lvar3[veh]+1) end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end end end end addCommandHandler("lights", toggleLights) addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end)
-
haha, that's a good question. as for now i'm trying to debug this script, since these 2 guys are saying that the script works just fine for them. it doesn't work me tho, so i wanna find out what could go wrong.
-
you owe me nothing. please relax, we're trying to make this community as friendly as possible, take your part. take a deep breath in, now breath out, breath in and breath out, yea like that. hope, you're feeling better now.
-
this doesn't matter, since your code doesn't work too. we really should stick to look of the original code. another question, is it possible to use some button instead of a command? i guees, the code for this should look like: bindKey("F1", "up", function() carfade = (not carfade) if(carfade)then outputChatBox("#FFFFFF[HIDE]#FF5500Vehicles are now #FF0000hidden!", 255, 128, 0, true) else outputChatBox("#FFFFFF[sHOW]#FF5500Vehicles are now #00FF00visible, carfade has been #00FF00enabled!", 255, 128, 0, true) end i copypasted it from a carfade script, so don't mind those carfade words.
-
mmm, now it doesn't work again.
-
i updated the previous post. like that?
