Jump to content

تصحيح كود


LOAM

Recommended Posts

السلام عليكم شباب  انا معايا هذه الكود  عباره عن انك تاخد سياره من ماركر

وراح تظهر علامه فى الخريطه وماركر عند العلامه

والمفروض تسلم السياره عند المركر الى عند العلامه الى ظهرت فى الخريطه

لما بروح اسلامها مش بيسحب السياره ولا يعطينى فلوس

------الكلنت

local Marker1 = createMarker ( 1615.99597, -1506.97876, 13.20746 , "cylinder" , 1.5 , 255 , 0 , 255 , 150 )
Blip = createBlipAttachedTo ( Marker1 , 42 ) 
outputChatBox ( " now u have car Drugs " ) 


---اللوحه


addEventHandler("onClientMarkerHit",Marker1,
	function ( KillerProject )
	if (getElementType (KillerProject) == "player") and (KillerProject == localPlayer)  then
	local Team = getPlayerTeam(getLocalPlayer())
	if Team and getTeamName(Team) == "Criminal" then		
	guiSetVisible(GUIEditor.window[1],true)
	showCursor(true)
	exports["guimessages"]:outputClient("The window is showed...", 255, 255, 0,source)
	end
	end
	end
)
addEventHandler("onClientGUIClick",root,
function()
if source == GUIEditor.button[1] then 
triggerServerEvent ("takecar",localPlayer)
elseif source == GUIEditor.button[3] then 
triggerServerEvent ("takecar",localPlayer)
elseif (source == GUIEditor.button[6]) then
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
end
)
addEvent ("CreateMarker",true)
addEventHandler ("CreateMarker",root,
	function ( theCar )
	Marker = createMarker ( 1607.87683, -1513.71655, 13.57542, "cylinder" , 2 , 255 , 0 , 255 , 255 )
	Blip = createBlipAttachedTo ( Marker , 38 ) 
	
	end
)
addEventHandler ("onClientMarkerHit",root,
	function ( theCar )
	if getElementType ( localPlayer ) == "vehicle" and isPedInVehicle ( localPlayer ) then  
	if source == Marker then 
	triggerServerEvent ( "GivePlayerMoney", localPlayer, theCar )
	if isElement (Marker) then
	destroyElement ( Marker )
	end
	if isElement (Blip) then
	destroyElement ( Blip ) 
	end
	end
	end
	end
)


---السرفر 
addEvent("takecar",true)
addEventHandler("takecar",root,
function()
	theCar = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( client , theCar )
	triggerClientEvent ( source , "CreateMarker" , source, theCar )
	end
)
addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( theCar )
	givePlayerMoney ( client , 7000 )
	outputChatBox (" you get 7,000k " , client ,0,255,0,true)
	if isElement ( theCar ) then
	destroyElement ( theCar )
	end
	end
)

وشكرا  مقدما :D

Link to comment
9 hours ago, #BrosS said:

 

:|

البوست السابق  منفعتش كل الردود  جربتها وما ظبطت  قلت استنا شويه واعمل حاجا غيرو  وبعد كده قلت انزلو تانى يمكن حد يصلحو

Link to comment
10 hours ago, LOAM said:

السلام عليكم شباب  انا معايا هذه الكود  عباره عن انك تاخد سياره من ماركر

وراح تظهر علامه فى الخريطه وماركر عند العلامه

والمفروض تسلم السياره عند المركر الى عند العلامه الى ظهرت فى الخريطه

لما بروح اسلامها مش بيسحب السياره ولا يعطينى فلوس


------الكلنت

local Marker1 = createMarker ( 1615.99597, -1506.97876, 13.20746 , "cylinder" , 1.5 , 255 , 0 , 255 , 150 )
Blip = createBlipAttachedTo ( Marker1 , 42 ) 
outputChatBox ( " now u have car Drugs " ) 


---اللوحه


addEventHandler("onClientMarkerHit",Marker1,
	function ( KillerProject )
	if (getElementType (KillerProject) == "player") and (KillerProject == localPlayer)  then
	local Team = getPlayerTeam(getLocalPlayer())
	if Team and getTeamName(Team) == "Criminal" then		
	guiSetVisible(GUIEditor.window[1],true)
	showCursor(true)
	exports["guimessages"]:outputClient("The window is showed...", 255, 255, 0,source)
	end
	end
	end
)
addEventHandler("onClientGUIClick",root,
function()
if source == GUIEditor.button[1] then 
triggerServerEvent ("takecar",localPlayer)
elseif source == GUIEditor.button[3] then 
triggerServerEvent ("takecar",localPlayer)
elseif (source == GUIEditor.button[6]) then
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
end
)
addEvent ("CreateMarker",true)
addEventHandler ("CreateMarker",root,
	function ( theCar )
	Marker = createMarker ( 1607.87683, -1513.71655, 13.57542, "cylinder" , 2 , 255 , 0 , 255 , 255 )
	Blip = createBlipAttachedTo ( Marker , 38 ) 
	
	end
)
addEventHandler ("onClientMarkerHit",root,
	function ( theCar )
	if getElementType ( localPlayer ) == "vehicle" and isPedInVehicle ( localPlayer ) then  
	if source == Marker then 
	triggerServerEvent ( "GivePlayerMoney", localPlayer, theCar )
	if isElement (Marker) then
	destroyElement ( Marker )
	end
	if isElement (Blip) then
	destroyElement ( Blip ) 
	end
	end
	end
	end
)


---السرفر 
addEvent("takecar",true)
addEventHandler("takecar",root,
function()
	theCar = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( client , theCar )
	triggerClientEvent ( source , "CreateMarker" , source, theCar )
	end
)
addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( theCar )
	givePlayerMoney ( client , 7000 )
	outputChatBox (" you get 7,000k " , client ,0,255,0,true)
	if isElement ( theCar ) then
	destroyElement ( theCar )
	end
	end
)

وشكرا  مقدما :D

اخي لازم تكون ف تيم Criminal

debugscript 3

Link to comment
4 minutes ago, #Soking said:

اطرح الاكواذ كلها

-------client

local Marker1 = createMarker ( 1615.99597, -1506.97876, 13.20746 , "cylinder" , 1.5 , 255 , 0 , 255 , 150 )
Blip = createBlipAttachedTo ( Marker1 , 42 ) 
outputChatBox ( " now u have car Drugs " ) 
GUIEditor = {
	tab = {},
	button = {},
	window = {},
	memo = {},
	label = {},
	tabpanel = {},
}
GUIEditor.window[1] = guiCreateWindow(391, 352, 500, 240, "Delivery/ /Drugs", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.85)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000")

GUIEditor.button[1] = guiCreateButton(39, 38, 116, 38, "Drug transfer 1", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
GUIEditor.button[3] = guiCreateButton(40, 110, 116, 38, "Drug transfer 2", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[3], "default-bold-small")
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
GUIEditor.label[1] = guiCreateLabel(174, 44, 294, 29, "Transport drugs to the LV city/for 7,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[3] = guiCreateLabel(175, 113, 294, 29, "Transport drugs to the SF city/for 15,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[3], "default-bold-small")
GUIEditor.button[6] = guiCreateButton(40, 175, 116, 38, "Close", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[6], "default-bold-small")
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
GUIEditor.tabpanel[2] = guiCreateTabPanel(241, 152, 250, 79, false, GUIEditor.window[1])
GUIEditor.tab[2] = guiCreateTab("explained", GUIEditor.tabpanel[2])
GUIEditor.memo[2] = guiCreateMemo(9, 6, 239, 46, "criminal can take Drugs car to any city for money .....Enjoy", false, GUIEditor.tab[2])
guiMemoSetReadOnly(GUIEditor.memo[2], true)
guiSetVisible (GUIEditor.window[1], false)

addEventHandler("onClientMarkerHit",Marker1,
	function ( KillerProject )
	if (getElementType (KillerProject) == "player") and (KillerProject == localPlayer)  then
	local Team = getPlayerTeam(getLocalPlayer())
	if Team and getTeamName(Team) == "Criminal" then		
	guiSetVisible(GUIEditor.window[1],true)
	showCursor(true)
	exports["guimessages"]:outputClient("The window is showed...", 255, 255, 0,source)
	end
	end
	end
)
addEventHandler("onClientGUIClick",root,
function()
if source == GUIEditor.button[1] then 
triggerServerEvent ("takecar",localPlayer)
elseif source == GUIEditor.button[3] then 
triggerServerEvent ("takecar",localPlayer)
elseif (source == GUIEditor.button[6]) then
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
end
)
addEvent ("CreateMarker",true)
addEventHandler ("CreateMarker",root,
	function ( theCar )
	Marker = createMarker ( 1607.87683, -1513.71655, 13.57542, "cylinder" , 2 , 255 , 0 , 255 , 255 )
	Blip = createBlipAttachedTo ( Marker , 38 ) 
	
	end
)
addEventHandler ("onClientMarkerHit",root,
	function ( theCar )
	if getElementType ( localPlayer ) == "vehicle" and isPedInVehicle ( localPlayer ) then  
	if source == Marker then 
	triggerServerEvent ( "GivePlayerMoney", localPlayer, theCar )
	if isElement (Marker) then
	destroyElement ( Marker )
	end
	if isElement (Blip) then
	destroyElement ( Blip ) 
	end
	end
	end
	end
)

-----------server
addEvent("takecar",true)
addEventHandler("takecar",root,
function()
	theCar = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( client , theCar )
	triggerClientEvent ( source , "CreateMarker" , source, theCar )
	end
)
addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( theCar )
	givePlayerMoney ( client , 7000 )
	outputChatBox (" you get 7,000k " , client ,0,255,0,true)
	if isElement ( theCar ) then
	destroyElement ( theCar )
	end
	end
)

 

Link to comment
2 minutes ago, #BrosS said:

client سطر 98 و 99, ودي أفهم ليه

اخى ياريت تعديل الكود لانى  صنعته ليس وحدى  فى ناس تانى ساعدتنى فيه  اخى  برووس

Link to comment
1 hour ago, LOAM said:

طيب حد يعدل الكود لو فيه حطاء يا شباب

------client

local Marker1 = createMarker ( 1615.99597, -1506.97876, 13.20746 , "cylinder" , 1.5 , 255 , 0 , 255 , 150 )
Blip = createBlipAttachedTo ( Marker1 , 42 ) 
outputChatBox ( " now u have car Drugs " ) 
GUIEditor = {
	tab = {},
	button = {},
	window = {},
	memo = {},
	label = {},
	tabpanel = {},
}
GUIEditor.window[1] = guiCreateWindow(391, 352, 500, 240, "Delivery/ /Drugs", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.85)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000")

GUIEditor.button[1] = guiCreateButton(39, 38, 116, 38, "Drug transfer 1", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
GUIEditor.button[3] = guiCreateButton(40, 110, 116, 38, "Drug transfer 2", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[3], "default-bold-small")
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
GUIEditor.label[1] = guiCreateLabel(174, 44, 294, 29, "Transport drugs to the LV city/for 7,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[3] = guiCreateLabel(175, 113, 294, 29, "Transport drugs to the SF city/for 15,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[3], "default-bold-small")
GUIEditor.button[6] = guiCreateButton(40, 175, 116, 38, "Close", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[6], "default-bold-small")
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
GUIEditor.tabpanel[2] = guiCreateTabPanel(241, 152, 250, 79, false, GUIEditor.window[1])
GUIEditor.tab[2] = guiCreateTab("explained", GUIEditor.tabpanel[2])
GUIEditor.memo[2] = guiCreateMemo(9, 6, 239, 46, "criminal can take Drugs car to any city for money .....Enjoy", false, GUIEditor.tab[2])
guiMemoSetReadOnly(GUIEditor.memo[2], true)
guiSetVisible (GUIEditor.window[1], false)

addEventHandler("onClientMarkerHit",Marker1,
	function ( KillerProject )
	if (getElementType (KillerProject) == "player") and (KillerProject == localPlayer)  then
	local Team = getPlayerTeam(getLocalPlayer())
	if Team and getTeamName(Team) == "Criminal" then		
	guiSetVisible(GUIEditor.window[1],true)
	showCursor(true)
	exports["guimessages"]:outputClient("The window is showed...", 255, 255, 0,source)
	end
	end
	end
)
addEventHandler("onClientGUIClick",root,
function()
if source == GUIEditor.button[1] then 
triggerServerEvent ("takecar",localPlayer)
elseif source == GUIEditor.button[3] then 
triggerServerEvent ("takecar",localPlayer)
elseif (source == GUIEditor.button[6]) then
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
end
)
addEvent ("CreateMarker",true)
addEventHandler ("CreateMarker",root,
	function ( theCar )
	Marker = createMarker ( 1607.87683, -1513.71655, 13.57542, "cylinder" , 2 , 255 , 0 , 255 , 255 )
	Blip = createBlipAttachedTo ( Marker , 38 ) 
	
	end
)
addEventHandler ("onClientMarkerHit",root,
	function ( theCar )
	
	if source == Marker then 
	triggerServerEvent ( "GivePlayerMoney", localPlayer, theCar )
	if isElement (Marker) then
	destroyElement ( Marker )
	end
	if isElement (Blip) then
	destroyElement ( Blip ) 
	end
	end
	end
	end
)

-----------server
addEvent("takecar",true)
addEventHandler("takecar",root,
function()
	theCar = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( client , theCar )
	triggerClientEvent ( source , "CreateMarker" , source, theCar )
	end
)
addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( theCar )
	givePlayerMoney ( client , 7000 )
	outputChatBox (" you get 7,000k " , client ,0,255,0,true)
	if isElement ( theCar ) then
	destroyElement ( theCar )
	end
	end
)

جرب دا يا جميل

  • Like 1
Link to comment
1 minute ago, AchrefF said:

------client

local Marker1 = createMarker ( 1615.99597, -1506.97876, 13.20746 , "cylinder" , 1.5 , 255 , 0 , 255 , 150 )
Blip = createBlipAttachedTo ( Marker1 , 42 ) 
outputChatBox ( " now u have car Drugs " ) 
GUIEditor = {
	tab = {},
	button = {},
	window = {},
	memo = {},
	label = {},
	tabpanel = {},
}
GUIEditor.window[1] = guiCreateWindow(391, 352, 500, 240, "Delivery/ /Drugs", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.85)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000")

GUIEditor.button[1] = guiCreateButton(39, 38, 116, 38, "Drug transfer 1", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
GUIEditor.button[3] = guiCreateButton(40, 110, 116, 38, "Drug transfer 2", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[3], "default-bold-small")
guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFFFFFF")
GUIEditor.label[1] = guiCreateLabel(174, 44, 294, 29, "Transport drugs to the LV city/for 7,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[3] = guiCreateLabel(175, 113, 294, 29, "Transport drugs to the SF city/for 15,000k", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[3], "default-bold-small")
GUIEditor.button[6] = guiCreateButton(40, 175, 116, 38, "Close", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[6], "default-bold-small")
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF")
GUIEditor.tabpanel[2] = guiCreateTabPanel(241, 152, 250, 79, false, GUIEditor.window[1])
GUIEditor.tab[2] = guiCreateTab("explained", GUIEditor.tabpanel[2])
GUIEditor.memo[2] = guiCreateMemo(9, 6, 239, 46, "criminal can take Drugs car to any city for money .....Enjoy", false, GUIEditor.tab[2])
guiMemoSetReadOnly(GUIEditor.memo[2], true)
guiSetVisible (GUIEditor.window[1], false)

addEventHandler("onClientMarkerHit",Marker1,
	function ( KillerProject )
	if (getElementType (KillerProject) == "player") and (KillerProject == localPlayer)  then
	local Team = getPlayerTeam(getLocalPlayer())
	if Team and getTeamName(Team) == "Criminal" then		
	guiSetVisible(GUIEditor.window[1],true)
	showCursor(true)
	exports["guimessages"]:outputClient("The window is showed...", 255, 255, 0,source)
	end
	end
	end
)
addEventHandler("onClientGUIClick",root,
function()
if source == GUIEditor.button[1] then 
triggerServerEvent ("takecar",localPlayer)
elseif source == GUIEditor.button[3] then 
triggerServerEvent ("takecar",localPlayer)
elseif (source == GUIEditor.button[6]) then
guiSetVisible(GUIEditor.window[1],false)
showCursor(false)
end
end
)
addEvent ("CreateMarker",true)
addEventHandler ("CreateMarker",root,
	function ( theCar )
	Marker = createMarker ( 1607.87683, -1513.71655, 13.57542, "cylinder" , 2 , 255 , 0 , 255 , 255 )
	Blip = createBlipAttachedTo ( Marker , 38 ) 
	
	end
)
addEventHandler ("onClientMarkerHit",root,
	function ( theCar )
	
	if source == Marker then 
	triggerServerEvent ( "GivePlayerMoney", localPlayer, theCar )
	if isElement (Marker) then
	destroyElement ( Marker )
	end
	if isElement (Blip) then
	destroyElement ( Blip ) 
	end
	end
	end
	end
)

-----------server
addEvent("takecar",true)
addEventHandler("takecar",root,
function()
	theCar = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( client , theCar )
	triggerClientEvent ( source , "CreateMarker" , source, theCar )
	end
)
addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( theCar )
	givePlayerMoney ( client , 7000 )
	outputChatBox (" you get 7,000k " , client ,0,255,0,true)
	if isElement ( theCar ) then
	destroyElement ( theCar )
	end
	end
)

جرب دا يا جميل

والله انك برنس  بتساعدنى فى كل منشوراتى

بقالى 20 يوم مش لاقى حل

ولما رديت انت ظبطت معاى

Link to comment
3 minutes ago, AchrefF said:

فى الخدمه:)

يا طيب كل شىئ ظبط ودلوقتى لما بدخل الماركر باخد فلوس بس فى شىئ السياره مش بتتسحب لما باخد الفلوس بتفضل معاى

Link to comment

جرب

addEvent("takecar",true)
addEventHandler("takecar",root,
function(	)
	Vehicle[source] = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( source , Vehicle[source] )
	triggerClientEvent ( source , "CreateMarker" , source )
	end
)
addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( )
		givePlayerMoney ( source , 7000 )
		outputChatBox (" you get 7,000k " , source ,0,255,0,true)
		if ( isElement( OVehicle[source] ) ) then 
		destroyElement ( Vehicle[source] )
	end
end)

  

 

Edited by Deativated
Link to comment
7 minutes ago, Deativated said:

جرب


addEvent("takecar",true)addEventHandler("takecar",root,function(	)	Vehicle[source] = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )	warpPedIntoVehicle( source , Vehicle[source] )	triggerClientEvent ( source , "CreateMarker" , source )	end)addEvent ("GivePlayerMoney",true)addEventHandler ("GivePlayerMoney",root,	function ( )		givePlayerMoney ( source , 7000 )		outputChatBox (" you get 7,000k " , source ,0,255,0,true)		if ( isElement( OVehicle[source] ) ) then 		destroyElement ( Vehicle[source] )	endend)  

 

برضو اخى ما ظبط

Link to comment
5 minutes ago, Deativated said:

if ( isElement( OVehicle[source] ) ) then

عدلها ألي


if ( isElement( Vehicle[source] ) ) then

 

اخى ما ظبط  كده مش بياخد السياره 

:)

هذه الكود لما اشيلو واركب القديم ياخذ السياره بس برضو مش بتتسحب

Link to comment
addEvent("takecar",true)
addEventHandler("takecar",root,
function(	)
	Vehicle[client] = createVehicle( 459 , 1604.86340, -1466.26294, 13.56293 )
	warpPedIntoVehicle( source , Vehicle[client] )
	triggerClientEvent ( source , "CreateMarker" , source )
	end
)

addEvent ("GivePlayerMoney",true)
addEventHandler ("GivePlayerMoney",root,
	function ( )
		givePlayerMoney ( source , 7000 )
		outputChatBox (" you get 7,000k " , source ,0,255,0,true)
	    destroyElement ( Vehicle[client] )
end)

 

Link to comment

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...