Jump to content

x[ طلب ]x بعض الاكواد


MA[S]RIY

Recommended Posts

السلام عليكم

انا ابي بعض الاكواد

انا مسوي بوتون في لوحة

ابي لما اضغط عليه

ينقلني في مكان وهمي1

2 يعطيه سلاح =عصي 

يكون في المكان الي انا اتنقلت بيه مراكر 3

اول ما تدخل الماركر يعطيك فلوس +يختفي الماركر 4

بعد 5 دقائق من بعد ضغطك علي الزر

يرجع للبداية

-------------------------

:D وبس

؟

#

 

 

Link to comment

جماعه انا برسل ترايقر

وبسوي فيه كل االاكواد ولا كود حق وش ؟

 

ارجوكو ممكن احد يكملي الكود

لانو لخبطني خالص + الي  انا سويته طلع غلط

ارجوكوووووو احد يكملة ويزبطة

---كلينت
-----------------------------------------------------------------------------------
addEventHandler("onClientGUIClick",root,function () 
if source == start then
guiSetVisible ( wnd, false ) showCursor ( false )
triggerClientEvent(source, "abds", source)

s,d,f,g,h = 1, 205, 255, 255, 150

local markr1 = createMarker  ( 1624.51648, 1818.91882, 10.8203-1, "cylinder", s,d,f,g,h)
local markr2 = createMarker  ( -322.39169, 1056.97058, 19.7422-1, "cylinder", s,d,f,g,h)
local markr3 = createMarker  ( -1408.56067, 2630.16528, 55.688-1, "cylinder", s,d,f,g,h)
local markr4 = createMarker  ( -2668.42334, 635.54651, 14.4531-1, "cylinder", s,d,f,g,h)
local markr5 = createMarker  ( -2190.48022, -2269.93091, 30.60-1, "cylinder", s,d,f,g,h)
local markr6 = createMarker  ( -311.26492, 1486.46765, 75.9761-1, "cylinder", s,d,f,g,h)
local markr7 = createMarker  ( 222.793900, -81.857710, 1.57813-1, "cylinder", s,d,f,g,h)
local markr8 = createMarker  ( 1214.30835, 348.603360, 19.4643-1, "cylinder", s,d,f,g,h)
local markr9 = createMarker  ( 2506.92017, -1679.44653, 13, "cylinder", s,d,f,g,h)
local markr10 = createMarker  ( 1722.75684, -1610.52246, 13, "cylinder", s,d,f,g,h)
local markr11 = createMarker ( 1287.40295, -1562.08289, 13, "cylinder", s,d,f,g,h)
local markr12 = createMarker ( 1326.32141, -1164.76501, 23.82813, "cylinder", s,d,f,g,h)
local markr13 = createMarker ( 1151.03821, -1221.90747, 17.73531, "cylinder", s,d,f,g,h)

addEventHandler('onClientMarkerHit', root,
function ( hitPlayer )
if source == markr1 or source == markr2 or source == markr3 or source == markr4 or source == markr5 or source == markr6 or source == markr7 or source == markr8 or source == markr9 or source == markr10 or source == markr11 or source == markr12 or source == markr13 then
local Invehicle = getPlayerOccupiedVehicle ( localPlayer )
if not Invehicle then
if ( hitPlayer == localPlayer ) then
    local money = (50000)
givePlayerMoney( getRootElement(), money )
destroyElement ----م عارف اكمل كود خفي الماركر

end
end
end
end
)
end 
end 
)



----سرفر
addEvent("abds", true) 
addEventHandler("abds", root, 
function()
setElementModel ( source, 28 ) --يعطيه سكن
setElementDimension ( source, 30 ) -- يحطة بالعالم الوهمي 30
giveWeapon ( source, 3, 9999 ) -- يعطبه سلاح

end 
)

 

Link to comment

عندك اخطاء كثيره

addEventHandler("onClientGUIClick",root,function () 
if source == start then
guiSetVisible ( wnd, false )
showCursor ( false )
CreateMarker()
triggerServerEvent("abds", localPlayer) 
end
end
)

--Table x,y,z,siz,r,g,b 
Marker = {
{3184.22998,-2012.76697,1.19536,1.2,255,255,0},
}


function CreateMarker()
for i,v in ipairs(Marker) do
local x,y,z,siz,r,g,b,int,dim = v[1],v[2],v[3],v[4],v[5],v[6],v[7]
themarker = createMarker(x,y,z,"cylinder",siz,r,g,b,200)
setElementDimension (themarker, 30) 
addEventHandler('onClientMarkerHit', themarker,hitMarker)
end
end


function hitMarker( hitPlayer )
if ( hitPlayer == localPlayer and not isPedInVehicle ( localPlayer ) ) then
triggerServerEvent("giveMoney", localPlayer) 
setTimer(setElementPosition, 300000, 1, localPlayer,x,y,z)
destroyElement(themarker) 
end
end




----سرفر
addEvent("giveMoney", true) 
addEventHandler("giveMoney", root, 
function(player)
givePlayerMoney(player,1000)
end 
)
addEvent("abds", true) 
addEventHandler("abds", root, 
function()
setElementModel ( source, 28 ) --يعطيه سكن
setElementDimension ( source, 30 ) -- يحطة بالعالم الوهمي 30
giveWeapon ( source, 3, 9999 ) -- يعطبه سلاح

end 
)

 

Link to comment
2 hours ago, Kara said:

عندك اخطاء كثيره


addEventHandler("onClientGUIClick",root,function () 
if source == start then
guiSetVisible ( wnd, false )
showCursor ( false )
CreateMarker()
triggerServerEvent("abds", localPlayer) 
end
end
)

--Table x,y,z,siz,r,g,b 
Marker = {
{3184.22998,-2012.76697,1.19536,1.2,255,255,0},
}


function CreateMarker()
for i,v in ipairs(Marker) do
local x,y,z,siz,r,g,b,int,dim = v[1],v[2],v[3],v[4],v[5],v[6],v[7]
themarker = createMarker(x,y,z,"cylinder",siz,r,g,b,200)
setElementDimension (themarker, 30) 
addEventHandler('onClientMarkerHit', themarker,hitMarker)
end
end


function hitMarker( hitPlayer )
if ( hitPlayer == localPlayer and not isPedInVehicle ( localPlayer ) ) then
triggerServerEvent("giveMoney", localPlayer) 
setTimer(setElementPosition, 300000, 1, localPlayer,x,y,z)
destroyElement(themarker) 
end
end




----سرفر
addEvent("giveMoney", true) 
addEventHandler("giveMoney", root, 
function(player)
givePlayerMoney(player,1000)
end 
)
addEvent("abds", true) 
addEventHandler("abds", root, 
function()
setElementModel ( source, 28 ) --يعطيه سكن
setElementDimension ( source, 30 ) -- يحطة بالعالم الوهمي 30
giveWeapon ( source, 3, 9999 ) -- يعطبه سلاح

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