BieHDC
Members-
Posts
296 -
Joined
-
Last visited
Everything posted by BieHDC
-
Hello, i am looking for a very simple NPC script. All i found are advanced script with collision detection...which i dont need. I want only to set coordinates and the npc is driving them one after other. I should be added to a map > so standalone I also have OMG(object movement generator), but this can only animate objects and no vehicles. If you know such an resource pls tell me thx
-
can somebody confirm that the script works?
-
Is this the script i was looking for?
-
Found this: cLP = getLocalPlayer() screenWidth, screenHeight = guiGetScreenSize() function cRStest() setTimer(resourcesCheck, 10000, 1) end addEventHandler("onClientResourceStart", getRootElement(), cRStest) function resourcesCheck() if check=="done" then return else setRadioChannel(0) setTimer(cbinds, 1000, 1) textToggle=0 check="done" end end function cRS() if check=="done" then return else setRadioChannel(0) setTimer(cbinds, 3333, 1) textToggle=0 check="done" end end addEventHandler("onClientPlayerSpawn", getLocalPlayer(), cRS) function markers(player) if isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) fixVehicle(vehicle) end end addEventHandler("onClientMarkerHit", getResourceRootElement(getThisResource()), markers) function cbinds() local keys1 = getBoundKeys("vehicle_fire") local keys2 = getBoundKeys("vehicle_secondary_fire") if keys1 then for keyName, state in pairs(keys1) do bindKey(keyName, "down", cdoshoot) end bindKey("F", "down", cdoshoot) cbindsText = "- Press F or the button you use to fire to shoot rockets!\n- You can shoot once every 3 seconds.\n- good luck and have fun!.Scipt made By play3r" end if keys2 then for keyName, state in pairs(keys2) do bindKey(keyName, "down", cdoshoot) end end if (not keys1) and (not keys2) then bindKey("F", "down", cdoshoot) bindKey("lctrl", "down", cdoshoot) bindKey("rctrl", "down", cdoshoot) cbindsText = "- Press F or CTRL to shoot rockets!\n- You can shoot once every 3 seconds." end theVehicle = getPedOccupiedVehicle(cLP) allowShoots() bindKey("M", "down", toggleText) outputChatBox("#FF0000Press #00ff00M #ff0000to show/hide instructions! \"{SMILIES_PATH}/icon_biggrin.gif\" alt=\"\" title=\"Very Happy\" />", 255, 255, 255, true) end function toggleText() if textToggle==0 then addEventHandler("onClientRender", getRootElement(), bindsText) textToggle=1 elseif textToggle==1 then removeEventHandler("onClientRender", getRootElement(), bindsText) textToggle=0 end end function allowShoots() bindTrigger = 1 end function cdoshoot() if bindTrigger == 1 then if not isPlayerDead(cLP) then bindTrigger = 0 local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getVehicleRotation(theVehicle) local x = x+4*math.cos(math.rad(rZ+90)) local y = y+4*math.sin(math.rad(rZ+90)) createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShoots, 3000, 1) end end end function bindsText() dxDrawText(cbindsText, screenWidth/15, screenHeight/2.5, screenWidth, screenHeight, tocolor(0, 149, 254, 255), 0.75, "bankgothic") end
-
Is the script client side? And is it the full script for shooting rockets ouf of car?
-
Thx i was looking for^but scripts are complimed you know a map with these scripts uncomplimed?
-
Hello, i think that this was ask already some time ago, but cant find ANYWHERE. So how to add cars a rocket launcher? I think there is already a script, so can you pls post me link? thanks
-
oh man^^ do you know another good scripter?
-
thank you^^ are you paid scripter? then i have a big job for you
-
can you make this please with that i can set in directly the highest water level(20) the time to need until 20 (60sec) and the time to start raise and the script would calculate by itself? If i have to change the numbers, that would be easyer^^
-
and how to stop at 20m?
-
Hello, I want to make a script witch raises water to a defined high(example 20m) in a defined time(60secs until water reaches 20m) and the draining should start 15secs after map start I have found the following as example witch drains water: -- serverside local level = 0 function drainSomeWater() level = level - 0.01 setWaterLevel ( level ) end setTimer ( drainSomeWater, 100, 15000 ) if i dont use a negative number the water will raise (i think) but i want that the water needs 60sec unti have 20m and starts 15secs after map start, but i dont know how to do this. Please help me^^
-
How could i pay you if i would need a script?
-
works perfect If i need a bigger script in future i will pay you^^
-
ok i will try
-
And this creates 4 explosions with 16sec delay and all exploding at the same time?
-
Would the script look then so? local ExplosionPosition = { [1] = { x,y,z }, [2] = { x,y,z }, [3] = { x,y,z }, [4] = { x,y,z }, } addEventHandler ( "onClientPlayerSpawn", root, function ( ) local x, y, z = getElementPosition ( ExplosionPosition ) setTimer ( createExplosion, 16000, 1, x, y, z, 10, true, -1.0, false ) end )
-
So would that be right and working? and can i make a 2nd 3rd.... if i copy the 5 lines and make other coordinates? addEventHandler ( "onClientPlayerSpawn", root, function ( ) setTimer ( createExplosion, 16000, 1, 836.5, -2047, 12.5, 10, true, -1.0, false ) end )
-
Would it look so with coordinates? addEventHandler ( "onClientPlayerSpawn", root, function ( ) local x, y, z = getElementPosition ( source ) setTimer ( createExplosion, 16000, 1, 836.5, -2047, 12.5, 10, true, -1.0, false ) end )
-
Hello, i wanna make a script, that onPlayerSpawn makes timer to 16secs and than make an explosion. I have that: -- client side addEventHandler("onPlayerSpawn", resourceRoot, expl) setTimer (expl, 16000, 1, createExplosion) createExplosion (836.5 , -2047, 12.5, 10 , true, -1.0, false)
-
You missunderstood me I want a key combination for showing up a GUI and the same for toggle off. This combination should be set onJoin and on RecourceStart and if the player quit the bind should be deleted. Mkay?
-
I have a easy question. I wanna use a combined key shortcut (rshift + #) to open a panel, but i cant find how to make this. Here is the Code for bind: if isPlayerAdmin ( player ) then bindKey ( player, "rshift + #", "down", isPlayerAdmins ) end AND the same for unbind: unbindKey ( source, "rshift + #", "down", isPlayerAdmins )
-
OK now it works Thank you very much
-
I may have found the error: I think you written disallowed[vehicleID] but it schould be disallowedVehicle[vehicleID] while disallowedVehicle[vehicleID] do vehicleID = math.random(399, 609)
