Jump to content

طلب تعديل مود


Recommended Posts

السلام عليكم اسف طلباتي كثيرة بس والله محتاج غصب عني 

ده  مود اطلاق الصوريخ من السيارة ابي احوله بسريلات 

عشان مش اي احد يطلق

function shoot1()
	local vehicle = getPedOccupiedVehicle(localPlayer)
	if(vehicle) and not isCursorShowing() then 
		local x, y, z = getElementPosition(vehicle)
		createProjectile(vehicle, 19, x, y, z)
		addEventHandler("onClientPreRender",root,pb)
		setTimer ( function()
		unbindKey("mouse1", "down", shoot1 )
		setTimer(addBind1, 2900, 1)
	end, 50, 1 )
	end
end

function shoot2()
	local vehicle = getPedOccupiedVehicle(localPlayer)
	if(vehicle) and not isCursorShowing() then 
		local x, y, z = getElementPosition(vehicle)
		createProjectile(vehicle, 19, x, y, z)
		addEventHandler("onClientPreRender",root,pb2)
		setTimer ( function()
        unbindKey("mouse2", "down", shoot2 )
		setTimer(addBind2, 2900, 1)
	end, 50, 1 )
	end
end




function addBind1()
bindKey("mouse1", "down", shoot1)
end

function addBind2()
bindKey("mouse2", "down", shoot2)
end
addCommandHandler("d", d)
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addBind1)
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addBind2)









--loading hud

--hud
function hud()
    label2 = guiCreateLabel(0.895,0.787,0.94,0.92,"ROCKET 1",true)
	local screenWidth, screenHeight = guiGetScreenSize()
	local windowWidth, windowHeight = 180, 50
	local left = screenWidth/1.09 - windowWidth/2
	local top = screenHeight/1.2 - windowHeight/2
	prog =  guiCreateProgressBar(left, top, windowWidth, windowHeight, false)
	guiProgressBarSetProgress(prog,0)
	tick = getTickCount()
end
addEventHandler("onClientVehicleEnter",root,hud)
addEventHandler("onClientResourceStart",root,hud)

function pb()
	local done = getTickCount()
	if(guiProgressBarGetProgress(prog)==100)then
		local endT = getTickCount()
		removeEventHandler("onClientPreRender",root,pb)
		destroyElement(prog)
		setTimer(hud, 50, 1)
	else
		guiProgressBarSetProgress(prog,guiProgressBarGetProgress(prog)+1)
		if((done-tick)/1000 == 10)then
			slow()
		end
	end
end

function slow()
	removeEventHandler("onClientPreRender",root,pb)
end




--hud2
function hud2()
    label1 = guiCreateLabel(0.895,0.69,0.94,0.92,"ROCKET 2",true)
	local screenWidth, screenHeight = guiGetScreenSize()
	local windowWidth, windowHeight = 180, 50
	local left = screenWidth/1.09 - windowWidth/2
	local top = screenHeight/1.35 - windowHeight/2
	prog2 =  guiCreateProgressBar(left, top, windowWidth, windowHeight, false)
	guiProgressBarSetProgress(prog2,0)
	tick = getTickCount()
end
addEventHandler("onClientVehicleEnter",root,hud2)
addEventHandler("onClientResourceStart",root,hud2)

function pb2()
	local done = getTickCount()
	if(guiProgressBarGetProgress(prog2)==100)then
		local endT = getTickCount()
		removeEventHandler("onClientPreRender",root,pb2)
		destroyElement(prog2)
		setTimer(hud2, 50, 1)
	else
		guiProgressBarSetProgress(prog2,guiProgressBarGetProgress(prog2)+1)
		if((done-tick)/2000 == 20)then
			slow()
		end
	end
end





--die,exit
function hide()
destroyElement(prog)
destroyElement(prog2)
destroyElement(label1)
destroyElement(label2)
end
addEventHandler("onClientPlayerWasted",root,hide)
addEventHandler("OnClientPlayerVehicleExit",root,hide)









--JUMP
function bind()
bindKey("lshift", "down", jump)
end
addEventHandler("onClientResourceStart", root, bind)


player = localPlayer
function jump()
if isPedInVehicle(player) then
local veh = getPedOccupiedVehicle(player)
if isPedOnGround(player) then
local vx,vy,vz = getElementVelocity(veh)
setElementVelocity(veh,vx,vy,vz + 0.27)

setTimer ( function()
unbindKey("lshift", "down", jump )
setTimer(bind, 2400, 1)
	end, 1000, 1 )
end
end
end





outputChatBox("Script by Xwad")

 

Link to comment

السكربت اصلا كلينت سايد

اذن لازمك ترايقر للسيرفر سايد عشان تجيب سريال اللاعب

واذا سريال اللاعب من السريالات اللي حاطها في جدول تكون مسويه انت

تسوي ترايقر ل كلينت سايد

وتطلق عادي

Link to comment
1 hour ago, coNolel said:

السكربت اصلا كلينت سايد

اذن لازمك ترايقر للسيرفر سايد عشان تجيب سريال اللاعب

واذا سريال اللاعب من السريالات اللي حاطها في جدول تكون مسويه انت

تسوي ترايقر ل كلينت سايد

وتطلق عادي

والله لو اعرف في الكلام ده ما كان طلبت بليز سويه و اكون ممتن الك اخي

2 hours ago, Deativated said:

واحنا كيف نعرف الخطأ من كل السطور هكذا ؟

لا يا غالي ما في خطئ انا ابي احول المود بيشتغل بسريلات بس

Edited by Ahmed toap
Link to comment
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...