αвυ-wαleed Posted January 21, 2014 Posted January 21, 2014 local PlayerMoney = getPlayerMoney( plr ) if ( PlayerMoney >= 150 ) then takePlayerMoney( plr, 150 ) setPlayerArmor ( plr, 100 ) الطلب هنا ابغى اذا مامعى فلوس وسويت شراء يطلع النص الي تحت وين احطة بالتحديد في الكود ؟؟ معى ملاحظة ان مامعي فلووس outputChatBox ( "* * *] انت لاتملك المال* * * ", plr, 0, 0, 255, true )
shwaeki Posted January 21, 2014 Posted January 21, 2014 على ما اعتقد هيك جرب local PlayerMoney = getPlayerMoney( plr ) if ( PlayerMoney >= 150 ) then takePlayerMoney( plr, 150 ) setPlayerArmor ( plr, 100 ) else outputChatBox ( "* * *] انت لاتملك المال* * * ", plr, 0, 0, 255, true )
αвυ-wαleed Posted January 22, 2014 Author Posted January 22, 2014 انسى الكود الاول مالي دخل في الكود الاول بسوي كود جديد ابغى اللاعب مامعة 150 يطلع كلام
K1NG Posted January 22, 2014 Posted January 22, 2014 انسى الكود الاولمالي دخل في الكود الاول بسوي كود جديد ابغى اللاعب مامعة 150 يطلع كلام !! متى تبي هالتحقق يصير ؟ فهمنا وش السالفة
αвυ-wαleed Posted January 22, 2014 Author Posted January 22, 2014 ابغى اذا الرجال اشترى درع يجي كلام لقد اشتريت واذا مامعه فلوس وحاول يشتري يجيه لاتملك المال local PlayerMoney = getPlayerMoney( plr ) if ( PlayerMoney >= 150 ) then takePlayerMoney( plr, 150 ) setPlayerArmor ( plr, 100 )
K1NG Posted January 22, 2014 Posted January 22, 2014 ابغى اذا الرجال اشترى درع يجي كلام لقد اشتريت واذا مامعه فلوس وحاول يشتري يجيه لاتملك المال local PlayerMoney = getPlayerMoney( plr ) if ( PlayerMoney >= 150 ) then takePlayerMoney( plr, 150 ) setPlayerArmor ( plr, 100 ) ! شلون يشري الدرع ؟ بأمر ولا بزر ولا كيف
αвυ-wαleed Posted January 22, 2014 Author Posted January 22, 2014 اهاااا هذا الكود كامل local marker = createMarker ( 2013.8099365234,1544.779296875,11.310423851013, "cylinder", 1, 255, 252, 255 ); addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in ipairs( getElementsByType ( "player" ) ) do bindKey ( p, "h", "down", Animation ); end end ); addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "h", "down", Animation ); end ); function Animation ( plr ) if isElementWithinMarker ( plr, marker ) then local PlayerMoney = getPlayerMoney( plr ) if ( PlayerMoney >= 150 ) then takePlayerMoney( plr, 150 ) setElementFrozen ( plr, true ) setTimer (setElementFrozen, 5500, 1, plr, false) setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false); setPlayerArmor ( plr, 100 ) end end end ابغى اذا اشترى درع يقول تم شراء الدرع واذا مامعه فلوس يقول لاتملك المال واذا مر على الماركر دون مايشتري دون يضغط الزر يجي مرحبا بك
jafar Posted January 22, 2014 Posted January 22, 2014 local marker = createMarker ( 2013.8099365234,1544.779296875,11.310423851013, "cylinder", 1, 255, 252, 255 ); addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in ipairs( getElementsByType ( "player" ) ) do bindKey ( p, "h", "down", Animation ); end end ); addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "h", "down", Animation ); end ); function Animation ( plr ) if isElementWithinMarker ( plr, marker ) then local PlayerMoney = getPlayerMoney ( plr ); if ( PlayerMoney >= 150 ) then takePlayerMoney ( plr, 150 ); setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false ); setPedArmor ( plr, 100 ); outputChatBox ( "* لقد قمت بشراء الدرع !", plr, 0, 255, 0, true ); else outputChatBox ( "* لا يوجد لديك المال الكافي لشراء الدرع !", plr, 255, 0, 0, true ); end end end
αвυ-wαleed Posted January 22, 2014 Author Posted January 22, 2014 كفوووو جعفر باقي حاجة وحدة ابغى اذا مر على الماركر دون مايشتري يطلع له كلمة مرحبا
K1NG Posted January 22, 2014 Posted January 22, 2014 كفوووو جعفر باقي حاجة وحدة ابغى اذا مر على الماركر دون مايشتري يطلع له كلمة مرحبا local marker = createMarker ( 2013.8099365234,1544.779296875,11.310423851013, "cylinder", 1, 255, 252, 255 ); local bind = { } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in ipairs( getElementsByType ( "player" ) ) do bindKey ( p, "h", "down", Animation ); end end ); addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "h", "down", Animation ); end ); function Animation ( plr ) if isElementWithinMarker ( plr, marker ) then local PlayerMoney = getPlayerMoney ( plr ); if ( PlayerMoney >= 150 ) then takePlayerMoney ( plr, 150 ); setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false ); setPedArmor ( plr, 100 ); outputChatBox ( "* لقد قمت بشراء الدرع !", plr, 0, 255, 0, true ); else outputChatBox ( "* لا يوجد لديك المال الكافي لشراء الدرع !", plr, 255, 0, 0, true ); end bind[ plr ] = true end end addEventHandler ( "onMarkerLeave", marker, function ( player ) if ( getElementType ( player ) == "player" ) then if not ( bind[ player ] ) then outputChatBox ( "مرحبا بك", player, 255, 255, 0, true ) bind[ player ] = nil else bind[ player ] = nil end end end )
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