نصراوي Posted November 17, 2013 Share Posted November 17, 2013 سلام شباب بدي مود متال هادا المتال ادا دخلت ماركر كل 2 دقيقة يعتيك 9 الف ومتال جا فلوسي 92 الف وطلعت من الماركر ماراح يبعتي فلوس الى اذا كنت في الماركير Link to comment
iMr.Dawix~# Posted November 17, 2013 Share Posted November 17, 2013 createMarker isElementInMarker setTimer givePlayerMoney Link to comment
The Killer Posted November 17, 2013 Share Posted November 17, 2013 createMarker isElementInMarker setTimer givePlayerMoney isElementInMarker isElementWithinMarker Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 ماجربت الكود بس هل هو صح ام خطا local GiveMoney = createMarker(1,2,3, "cylinder", 1.5, 255, 0, 0, 150) function () setTimer ( givePlayerMoney, 10000, 1, 9000 ) if isElementWithinMarker(thePlayer, GiveMoney) then end end) الرجاء الجواب باسرع وقت Link to comment
AboShanab Posted November 17, 2013 Share Posted November 17, 2013 (edited) local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) setTimer(function () if isElementWithinMarker(localPlayer, marker) then givePlayerMoney(9000) end end,120000,1) استبدل x,y,z الى الاحداثيات Edited November 17, 2013 by Guest Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) setTimer(function (thePlayer) if isElementWithinMarker(thePlayer, marker) then givePlayerMoney(thePlayer, 9000 ) end end,120000,1) استبدل x,y,z الى الاحداثيات لازم ولا لا MarkerHit ماشتغل لازم احط Link to comment
AboShanab Posted November 17, 2013 Share Posted November 17, 2013 لا مو لازم + الكود ملف سيرفر Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 لا مو لازم + الكود ملف سيرفر طيب ماشتغل لية Link to comment
AboShanab Posted November 17, 2013 Share Posted November 17, 2013 thePlayer = ?? لا مو لازم + الكود ملف سيرفر Link to comment
AboShanab Posted November 17, 2013 Share Posted November 17, 2013 انتظر دقيقتين كاملتين وانت بالماركر + تاكد ان الكود ملف سيرفر Link to comment
فاّرس Posted November 17, 2013 Share Posted November 17, 2013 thePlayer = مو معرفه -__-" -__-" Parameters حتى لو كلنت مو معرفه لأن اساسا مافي Link to comment
AboShanab Posted November 17, 2013 Share Posted November 17, 2013 عدلت الكود + ملف كلنت Link to comment
فاّرس Posted November 17, 2013 Share Posted November 17, 2013 local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) setTimer(function () if isElementWithinMarker(localPlayer, marker) then givePlayerMoney(localPlayer, 9000 ) end end,120000,1) استبدل x,y,z الى الاحداثيات bool givePlayerMoney ( int amount ) Note: Using this function client side (not recommended) will not change a players money server side. Link to comment
AboShanab Posted November 17, 2013 Share Posted November 17, 2013 local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0, 150) setTimer(function () if isElementWithinMarker(localPlayer, marker) then givePlayerMoney(localPlayer, 9000 ) end end,120000,1) استبدل x,y,z الى الاحداثيات bool givePlayerMoney ( int amount ) Note: Using this function client side (not recommended) will not change a players money server side. تم التعديل مشكور ع الملاحظة : ) Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 عدلت الكود + ملف كلنت ماشتغل local marker = createMarker(1,2,3, "cylinder", 1.5, 255, 0, 0, 150) setTimer(function () if isElementWithinMarker(localPlayer, marker) then givePlayerMoney(localPlayer, 9000 ) end end,10000,1) تكفا حلوهي لي Link to comment
فاّرس Posted November 17, 2013 Share Posted November 17, 2013 الفلوس كلنت وهميه. ليه ما تسوي اذا لمس الماركر وتسوي تايمر داخل الحدث؟ Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 الفلوس كلنت وهميه.ليه ما تسوي اذا لمس الماركر وتسوي تايمر داخل الحدث؟ سويت بس اذا طلع من الماركر يضل يوزع له كل 10 ثواني Link to comment
jafar Posted November 17, 2013 Share Posted November 17, 2013 استخدم اذا خرج من الماركر onClientMarkerLeave or onMarkerLeave isTimer killTimer Link to comment
فاّرس Posted November 17, 2013 Share Posted November 17, 2013 local marker = createMarker(-700.14441,953.89948,12.34014, "cylinder", 1.5, 255, 0, 0, 150) addEventHandler('onMarkerHit',marker,function(playerHit) if getElementType(playerHit) == 'player' then setTimer(function() if isElementWithinMarker(playerHit,marker) then givePlayerMoney(playerHit,9000) end end,120000,0,playerHit) end end ) Link to comment
|Mr|-Talal07-| Posted November 17, 2013 Share Posted November 17, 2013 (edited) جرب ذا الكود ولا تنسى تعدل احداثيات الماركر local Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0) local times = {} addEventHandler("onMarkerHit",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if not times[element] and not isTimer(times[element]) then times[element] = setTimer( function (player) givePlayerMoney(player,9000) end ,10000,0,element) end end end ) addEventHandler("onMarkerLeave",Marker, function (element) if getElementType(element) == "player" then if times[element] and isTimer(times[element]) then killTimer(times[element]) times[element] = nil end end end ) addEventHandler("onPlayerQuit",root, function () if times[source] and isTimer(times[source]) then killTimer(times[source]) times[source] = nil end end ) Edited November 18, 2013 by Guest Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 جرب ذا الكود ولا تنسى تعدل احداثيات الماركر local Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0) local times = {} addEventHandler("onMarkerHit",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if not times[element] and not isTimer(times[element]) then times[element] = setTimer( function (player) givePlayerMoney(player,9000) end ,10000,0) end end end ) addEventHandler("onMarkerLeave",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if times[element] and isTimer(times[element]) then killTimer(times[element]) times[element] = nil end end end ) addEventHandler("onPlayerQuit",root, function () if times[source] and isTimer(times[source]) then killTimer(times[source]) times[source] = nil end end ) مازبط Link to comment
jafar Posted November 17, 2013 Share Posted November 17, 2013 (edited) -- Server Side Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0,255) times = { }; addEventHandler("onMarkerHit",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if not times[element] and not isTimer(times[element]) then times[element] = setTimer( function () givePlayerMoney(element,9000) end ,10000,0) end end end ) addEventHandler("onMarkerLeave",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if times[element] and isTimer(times[element]) then killTimer(times[element]) times[element] = nil end end end ) addEventHandler("onPlayerQuit",root, function () if times[source] and isTimer(times[source]) then killTimer(times[source]) times[source] = nil end end ) Edited November 17, 2013 by Guest Link to comment
نصراوي Posted November 17, 2013 Author Share Posted November 17, 2013 -- Server Side local Marker = createMarker(0,0,0,"cylinder",1.5,0,255,0) local times = {} addEventHandler("onMarkerHit",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if not times[element] and not isTimer(times[element]) then times[element] = setTimer( function () givePlayerMoney(element,9000) end ,10000,0) end end end ) addEventHandler("onMarkerLeave",Marker, function (element) if getElementType(element) == "player" and not isPedInVehicle(element) then if times[element] and isTimer(times[element]) then killTimer(times[element]) times[element] = nil end end end ) addEventHandler("onPlayerQuit",root, function () if times[source] and isTimer(times[source]) then killTimer(times[source]) times[source] = nil end end ) مايطلع الماركر ولا يعطيني فلوس Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now