MR:SADIQ Posted April 11, 2013 Share Posted April 11, 2013 مطلوب كود ماركر مكتوب فوقه كلام ادا دشه الاعب يسحب منه فلوس+ يكتب له على الشاشة كلام وشكراً Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 guiGetScreenSize "onClientRender" getScreenFromWorldPosition getCameraMatrix getDistanceBetweenPoints3D dxGetTextWidth dxGetFontHeight dxDrawText createMarker "onClientMarkerHit" triggerServerEvent givePlayerMoney Link to comment
MR:SADIQ Posted April 11, 2013 Author Share Posted April 11, 2013 guiGetScreenSize "onClientRender" getScreenFromWorldPosition getCameraMatrix getDistanceBetweenPoints3D dxGetTextWidth dxGetFontHeight dxDrawText createMarker "onClientMarkerHit" triggerServerEvent givePlayerMoney مو كأنه givePlayerMoney تعطي الاعب فلوس ولا لا؟ Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 أي بس الكلام فوق الماركر معقد شوي ويحتاج وظائف كثير Link to comment
MR:SADIQ Posted April 11, 2013 Author Share Posted April 11, 2013 (edited) أي بس الكلام فوق الماركر معقد شوي ويحتاج وظائف كثير بس عجل ماله داعي الكلام الي فوق الماركر edit : جدي يصير؟ function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) end function greetingHandler ( message ) outputChatBox ( "The client says: " .. message, source ) end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", getRootElement(), greetingHandler ) end function consoleGiveCash ( thePlayer, command, amount ) givePlayerMoney ( thePlayer, amount ) end addCommandHandler ( "givecash", consoleGiveCash ) Edited April 12, 2013 by Guest Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 هذا الكود تفضل ذذ حط احداثياتك وسويتة يعطي فلوس عشوائية من 1000 الى 5000 ويوم تلمسة يطلع كلام بالشاشة ويروح يوم توخر عنة # Client ; local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onClientMarkerHit",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then Amount = math.random(1000,5000) triggerServerEvent("GiveMoney",HitElement,Amount) addEventHandler("onClientRender",root,Dx) end end ) addEventHandler("onClientMarkerLeave",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then removeEventHandler("onClientRender",root,Dx) end end ) function RelativeToAbsolute( X, Y ) local rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end function Dx( ) local x,y = RelativeToAbsolute( 0.32,0.39 ) dxDrawText("لقد ربحت "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) end Server ; addEvent("GiveMoney",true) addEventHandler("GiveMoney",root, function (Amount) givePlayerMoney(source,tonumber(Amount)) end ) Link to comment
MR:SADIQ Posted April 11, 2013 Author Share Posted April 11, 2013 هذا الكود تفضل ذذ حط احداثياتك وسويتة يعطي فلوس عشوائية من 1000 الى 5000 ويوم تلمسة يطلع كلام بالشاشة ويروح يوم توخر عنة #Client ; local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onClientMarkerHit",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then Amount = math.random(1000,5000) triggerServerEvent("GiveMoney",HitElement,Amount) addEventHandler("onClientRender",root,Dx) end end ) addEventHandler("onClientMarkerLeave",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then removeEventHandler("onClientRender",root,Dx) end end ) function RelativeToAbsolute( X, Y ) local rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end function Dx( ) local x,y = RelativeToAbsolute( 0.32,0.39 ) dxDrawText("لقد ربحت "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) end Server ; addEvent("GiveMoney",true) addEventHandler("GiveMoney",root, function (Amount) givePlayerMoney(source,tonumber(Amount)) end ) مسامحة بس انا ابيه يسحب من الاعب مو يعطيه Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 addEvent("GiveMoney",true) addEventHandler("GiveMoney",root, function (Amount) takePlayerMoney(source,tonumber(Amount)) end ) Link to comment
MR:SADIQ Posted April 11, 2013 Author Share Posted April 11, 2013 addEvent("GiveMoney",true) addEventHandler("GiveMoney",root, function (Amount) takePlayerMoney(source,tonumber(Amount)) end ) ماتغير شي Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onClientMarkerHit",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then Amount = math.random(1000,5000) triggerServerEvent("TakeMoney",HitElement,Amount) addEventHandler("onClientRender",root,Dx) end end ) addEventHandler("onClientMarkerLeave",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then removeEventHandler("onClientRender",root,Dx) end end ) function RelativeToAbsolute( X, Y ) local rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end function Dx( ) local x,y = RelativeToAbsolute( 0.32,0.39 ) dxDrawText("لقد خسرت "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) end addEvent("TakeMoney",true) addEventHandler("TakeMoney",root, function (Amount) takePlayerMoney(source,tonumber(Amount)) end ) Link to comment
MR:SADIQ Posted April 11, 2013 Author Share Posted April 11, 2013 local marker = createMarker( x,y,z,"cylinder", 1.5, 255, 255, 0, 170 ) addEventHandler("onClientMarkerHit",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then Amount = math.random(1000,5000) triggerServerEvent("TakeMoney",HitElement,Amount) addEventHandler("onClientRender",root,Dx) end end ) addEventHandler("onClientMarkerLeave",marker, function ( HitElement ) if getElementType ( HitElement ) == "player" then removeEventHandler("onClientRender",root,Dx) end end ) function RelativeToAbsolute( X, Y ) local rX, rY = guiGetScreenSize() local x = X*rX local y = Y*rY return x, y end function Dx( ) local x,y = RelativeToAbsolute( 0.32,0.39 ) dxDrawText("لقد خسرت "..Amount.." $ ",x,y, 839, 371, tocolor(0,255,0, 255), 3, "default-bold", "left", "top", false, false, true, false, false) end addEvent("TakeMoney",true) addEventHandler("TakeMoney",root, function (Amount) takePlayerMoney(source,tonumber(Amount)) end ) تسلم Link to comment
MR:SADIQ Posted April 12, 2013 Author Share Posted April 12, 2013 استفسار يصير اخلي الاموال الي تنسحب من الاعبين تنرسل لحسابي؟ كيف؟ Link to comment
PaiN^ Posted April 12, 2013 Share Posted April 12, 2013 addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber( Amount ) ); givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); end ) Link to comment
MR:SADIQ Posted April 12, 2013 Author Share Posted April 12, 2013 addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber( Amount ) ); givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); end ) تسلم Link to comment
3NAD Posted April 12, 2013 Share Posted April 12, 2013 addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber( Amount ) ); givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); end ) ممكن يسبب أخطاء لو ماكان موجود اللاعب هذا .. addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber ( Amount ) ); local plr_ = getPlayerFromName ( 'إسمك في العبة' ) if isElement ( plr_ ) then givePlayerMoney ( plr_, tonumber ( Amount )); end end ) Link to comment
MR:SADIQ Posted April 12, 2013 Author Share Posted April 12, 2013 addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber( Amount ) ); givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); end ) ممكن يسبب أخطاء لو ماكان موجود اللاعب هذا .. addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber ( Amount ) ); local plr_ = getPlayerFromName ( 'إسمك في العبة' ) if isElement ( plr_ ) then givePlayerMoney ( plr_, tonumber ( Amount )); end end ) تسلم عناد جاري تجريبه وتسلمون جميعاً Link to comment
hassan.k.s.a Posted April 12, 2013 Share Posted April 12, 2013 خليه كله سيرفر احسن لأنه الترايقر في اقل من ثانيه يسبب لاق وممكن الاعب يلمس الماركر كثير او اكثر من لاعب وبيكون لاق كبير . Link to comment
|Mr|-Talal07-| Posted April 12, 2013 Share Posted April 12, 2013 addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber( Amount ) ); givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); end ) ممكن يسبب أخطاء لو ماكان موجود اللاعب هذا .. addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber ( Amount ) ); local plr_ = getPlayerFromName ( 'إسمك في العبة' ) if isElement ( plr_ ) then givePlayerMoney ( plr_, tonumber ( Amount )); end end ) تخيل الرجال مو موجود تروح فلوس الرجال كذاا addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) local plr_ = getPlayerFromName ( 'إسمك في العبة' ) if isElement ( plr_ ) then takePlayerMoney ( source, tonumber ( Amount ) ); givePlayerMoney ( plr_, tonumber ( Amount )); 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