Jump to content

مهم .....


Recommended Posts

local PlayerMoney = getPlayerMoney( plr ) 
      if ( PlayerMoney >= 150 ) then 
          takePlayerMoney( plr, 150 )  
setPlayerArmor ( plr, 100 ) 

الطلب هنا ابغى اذا مامعى فلوس وسويت شراء يطلع النص الي تحت وين احطة بالتحديد في الكود ؟؟

معى ملاحظة ان مامعي فلووس

outputChatBox ( "* * *] انت لاتملك المال* * * ", plr, 0, 0, 255, true ) 

Link to comment

على ما اعتقد هيك جرب

local PlayerMoney = getPlayerMoney( plr ) 
      if ( PlayerMoney >= 150 ) then 
          takePlayerMoney( plr, 150 ) 
setPlayerArmor ( plr, 100 ) 
  
else 
  
outputChatBox ( "* * *] انت لاتملك المال* * * ", plr, 0, 0, 255, true ) 

Link to comment

ابغى اذا الرجال اشترى درع

يجي كلام لقد اشتريت

واذا مامعه فلوس وحاول يشتري يجيه لاتملك المال

  
local PlayerMoney = getPlayerMoney( plr ) 
  
      if ( PlayerMoney >= 150 ) then 
  
          takePlayerMoney( plr, 150 )  
  
setPlayerArmor ( plr, 100 ) 

Link to comment
ابغى اذا الرجال اشترى درع

يجي كلام لقد اشتريت

واذا مامعه فلوس وحاول يشتري يجيه لاتملك المال

  
local PlayerMoney = getPlayerMoney( plr ) 
  
      if ( PlayerMoney >= 150 ) then 
  
          takePlayerMoney( plr, 150 )  
  
setPlayerArmor ( plr, 100 ) 

! شلون يشري الدرع ؟ بأمر ولا بزر ولا كيف

Link to comment

اهاااا هذا الكود كامل

  
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 

ابغى اذا اشترى درع يقول تم شراء الدرع

واذا مامعه فلوس يقول لاتملك المال

واذا مر على الماركر دون مايشتري دون يضغط الزر يجي مرحبا بك

Link to comment
  
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 

Link to comment
كفوووو جعفر باقي حاجة وحدة ابغى اذا مر على الماركر دون مايشتري يطلع له كلمة

مرحبا

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 
) 

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