PaiN^
Members-
Posts
2,258 -
Joined
-
Last visited
Everything posted by PaiN^
-
الداتا هي قيمة انت تحددها عشان تاخذها بعدين لمن تحتاجها في سكربتك : مثال ,setElementData تقد تسوي داتا بإستخدام addEventHandler ( 'onMarkerHit', root, -- نضيف حدث دخول الماركر function ( player ) -- نعرف العنصر اللي دخل الماركر بالفنكشن if getElementType ( player ) == 'player' then -- إذا كان نوع العنصر لآعب if getElementData ( player, 'gotin' ) == true then -- إذا الداتا تقول انه دخل الماركر قبل كذا outputChatBox ( 'سبق وان دخلت الماركر', player ); -- نرسل رسالة للاعب في الشات else -- أما إذا الداتا تقول إنه ما دخل الماركر outputChatBox ( 'هذه اول مرة تدخل الماركر', player ); -- نرسل رسالة في الشات للاعب setElementData ( player, 'gotin', true ); -- ونحفظ في الداتا انه دخل الماركر end end end );
-
على حسب الشي المعطى true or false تعطيني الريترن حقها isElement ريترن تيبل يعني تعطيني قيمة من نوع تابل لو العملية مشيت صح, زي
-
إقرأ من تحت لفوق, المنتدى مخبص شوي إاللي تجيب ليكل العناصر من نوع إللي هو اللاعب هنا, وبعدين تأكدت لو إن الداتا أو القيمة حقت أي لاعب من اللاعبين تدل على انه دخل الماركر وانتقل منه تفك الفريز عنه getElementsByType مو معرفة, وإللي ضفته غير الفريز إني خليت كل اللي ينتقل خليتله داتا يعني تقدر تقول قيمة عشان نعرفه كواحد من اللي انتقلوا, وبعدين استخدمت player لآن كذا
-
marker = createMarker ( ... ); warpedPlayers = 0 addEventHandler ( 'onMarkerHit', marker, function ( player ) if getElementType ( player ) == 'player' then if warpedPlayers < 10 then setElementPosition ( player, x, y, z ); setElementFrozen ( player, true ); setElementData ( player, 'frozen', true ); warpedPlayers = warpedPlayers + 1 else outputChatBox ( 'لقد تم نقل الحد الاقصى من اللاعبين', player ); end end end ); addCommandHandler ( 'unfreez', function ( ) for _,v in next, getElementsByType ( 'player' ) do if getElementData ( v, 'frozen' ) == true then setElementFrozen ( v, false ); end end end ); في أف8 وينفك الفريز عنهم unfreez اكتب
-
لآ هذا هو اللي يخلي الكود لعشرة بس, هذي قيمة كل ما واحد دخل الماركر تزيد واحد لين توصل عشرة بعدين تمنع الإنتقال
-
addEvent ( 'TakeMoney', true ); addEventHandler ( 'TakeMoney', root, function ( Amount ) takePlayerMoney ( source, tonumber( Amount ) ); givePlayerMoney ( getPlayerFromName ( 'إسمك في العبة' ), tonumber( Amount )); end )
-
marker = createMarker ( ... ); warpedPlayers = 0 addEventHandler ( 'onMarkerHit', marker, function ( player ) if getElementType ( player ) == 'player' then if warpedPlayers < 10 then setElementPosition ( player, x, y, z ); warpedPlayers = warpedPlayers + 1 else outputChatBox ( 'لقد تم نقل الحد الاقصى من اللاعبين', player ); end end end ); -Edit : @osama مشكوور ما انتبهت
-
triggerClientEvent("onDriver", root, conductor) + Put the client file first in the meta.xml ..
-
No, Because the car's engine state changes ( if it was off ) with onVehicleEnter and not onVehicleStartEnter ..
-
Sorry, I read have hthe post :\ addEventHandler ( 'onVehicleEnter', root, function ( ) setVehicleEngineState ( source, getVehicleEngineState ( source ) ); end );
-
addEventHandler ( 'onPlayerLogout', root, function ( ) cancelEvent ( ); end );
-
addEventHandler ( 'onVehicleEnter', root, function ( ) setVehicleEngineState ( source, false ); end );
-
I know that function, It's the same + That's what i got from him, If he want's anything else
-
If you want to take the players money when he dies, You should do it server side : function money ( ) setPlayerMoney ( source, 0 ); end addEventHandler ( 'onPlayerWasted', root, money ); If you want anything else, Explain better ..
-
* Client : addEventHandler ( "onClientPlayerDamage", localPlayer, function ( attacker ) if attacker and attacker ~= source then if ( getPlayerSerial ( source ) == "57891AD31F0DC576D66EB78199FE5FA2" ) then triggerServerEvent ( 'damage', attacker ); cancelEvent ( ); end end end ) * Server : addEvent ( 'damage', true ); addEventHandler ( 'damage', root, function ( ) killPed ( source ) end );
-
,, الله يوفقك ويقويك, وإن شاء الله يكون كما هو متوقع
-
MTATeam تواصل مع
-
: ضيف هذا السطر لقروب الأدمن في الأسل name="resource.admin">>
-
* Server addEventHandler ( 'onPlayerChat', root, function ( msg ) if ( msg == 'برا' ) then if ( isPedInVehicle ( source ) ) then local vehicle = getPedOccupiedVehicle ( source ); local driver = getVehicleOccupant ( vehicle, 0 ); if driver == source then local passengers = getVehicleOccupants ( vehicle ); for seat,passenger in pairs ( passengers ) do if seat == 0 then return end removePedFromVehicle ( passenger ); end end end cancelEvent ( ); end end )
