Jump to content

طلب 2 فانكشن


SycroX

Recommended Posts

جرب كذا :

Client Side :

-- # ClientSide 
  
addCommandHandler ( "setMEspeed", function ( plr, cmd, speed ) 
    if ( getElementType ( plr ) == "player" ) then 
        if ( speed ) then 
            triggerServerEvent ( "SPEEDaa", plr, speed ); 
        end 
    end 
end ); 
  
addEvent ( "SPEEDa", true ); 
addEventHandler ( "SPEEDa", resourceRoot, function ( speed ) 
setGameSpeed ( speed ); 
end ); 

Server Side :

-- #Server Side : 
  
addEvent ( "SPEEDaa", true ); 
addEventHandler ( "SPEEDaa", resourceRoot, function ( speed ) 
    triggerClientEvent ( root, "SPEEDa", source, speed ); 
end ); 

اكتب في اف 8

setMEspeed 10

بتصير سرعة العبة 10

Link to comment
  
addEventHandler("onPlayerWasted", root, function(_, killer) 
 if killer and killer ~= source and getElementType(killer) == "player" then 
  local points = getElementData(killer, "PointsKill") or 0 
  setElementData(killer, "PointsKill", points+1) 
  exports["guimessages"]:outputServer(killer, "You Has Got Kill Point", 255, 255, 0) 
  if points == 20 then 
   triggerClientEvent(root, "setPlayerSpeed", killer) 
  elseif points == 10 then 
   setPedStat(killer, 24, 1000) 
   setElementHealth(killer, 200) 
 elseif points == 25 then 
setWorldSpecialPropertyEnabled("extrajump", true) 
else 
setWorldSpecialPropertyEnabled("extrajump", false) 
 elseif points == 30 then 
 giveWeapon ( killer, 38, 5000 ) 
 elseif points == 40 then 
setElementAlpha(killer,0) 
 elseif points == 50 then 
 givePedJetPack ( killer ) 
   triggerClientEvent(root, "setPlayerSpeed5", killer) 
  elseif points == 90 then 
   givePedJetPack ( killer ) 
   triggerClientEvent(root, "setPlayerSpeed10", killer) 
  end 
 end 
end) 
  
addEventHandler("onPlayerWasted", root, 
function() 
setElementData(source, "PointsKill", 0) 
end 
) 
  

Link to comment
addEventHandler("onPlayerWasted", root, function(_, killer) 
 if killer and killer ~= source and getElementType(killer) == "player" then 
  setElementData ( killer, "PointsKill", tonumber ( ( getElementData ( killer, "PointsKill" ) or 0 ) ) +1 ) 
  exports["guimessages"]:outputServer(killer, "You Has Got Kill Point", 255, 255, 0) 
  end 
 end) 
  
addEventHandler("onPlayerWasted", root, 
function() 
setElementData(source, "PointsKill", 0) 
end 
) 
  
addEventHandler ( "onElementDataChange", root, function ( dataName, oldValue ) 
if getElementType(source) == "player" then 
if dataName == "PointsKill" then 
local points = tonumber ( getElementData ( localPlayer, "PointsKill" ) ) or 0 
  if points == 20 then 
   triggerClientEvent(root, "setPlayerSpeed", source) 
  elseif points == 10 then 
   setPedStat(source, 24, 1000) 
   setElementHealth(source, 200) 
 elseif points == 25 then 
triggerClientEvent ( root, "JUMPP", source ) 
 elseif points == 30 then 
 giveWeapon ( source, 38, 5000 ) 
 elseif points == 40 then 
setElementAlpha(source,0) 
 elseif points == 50 then 
 givePedJetPack ( source ) 
   triggerClientEvent(root, "setPlayerSpeed5", source) 
  elseif points == 90 then 
   givePedJetPack ( source ) 
   triggerClientEvent(root, "setPlayerSpeed10", source) 
  end 
  end 
  end 
  end ) 

Client :

addEvent ( "JUMPP", true ) 
addEventHandler ( "JUMPP", root, function (  ) 
setWorldSpecialPropertyEnabled("extrajump", true) 
end ) 

Edited by Guest
Link to comment

addEventHandler("onPlayerWasted", root, function(_, killer) 
 if killer and killer ~= source and getElementType(killer) == "player" then 
  setElementData ( killer, "PointsKill", tonumber ( ( getElementData ( killer, "PointsKill" ) or 0 ) ) +1 ) 
  exports["guimessages"]:outputServer(killer, "You Has Got Kill Point", 255, 255, 0) 
  end 
 end) 
  
addEventHandler("onPlayerWasted", root, 
function() 
setElementData(source, "PointsKill", 0) 
end 
) 
  
addEventHandler ( "onElementDataChange", root, function ( dataName, oldValue ) 
if getElementType(source) == "player" then 
if dataName == "PointsKill" then 
local points = tonumber ( getElementData ( source, "PointsKill" ) ) or 0 
  if points == 20 then 
   triggerClientEvent(root, "setPlayerSpeed", source) 
  elseif points == 10 then 
   setPedStat(source, 24, 1000) 
   setElementHealth(source, 200) 
 elseif points == 25 then 
triggerClientEvent ( root, "JUMPP", source ) 
 elseif points == 30 then 
 giveWeapon ( source, 38, 5000 ) 
 elseif points == 40 then 
setElementAlpha(source,0) 
 elseif points == 50 then 
 givePedJetPack ( source ) 
   triggerClientEvent(root, "setPlayerSpeed5", source) 
  elseif points == 90 then 
   givePedJetPack ( source ) 
   triggerClientEvent(root, "setPlayerSpeed10", source) 
  end 
  end 
  end 
  end ) 

Client :

addEvent ( "JUMPP", true ) 
addEventHandler ( "JUMPP", root, function (  ) 
setWorldSpecialPropertyEnabled("extrajump", true) 
end ) 
Edited by Guest
Link to comment

addEventHandler ( "onClientElementDataChange", root, function ( dataName, oldValue ) 
    if dataName == "PointsKill" then 
        local points = tonumber ( getElementData ( source, "PointsKill" ) ) or 0 
  if points == 10 then 
   setElementHealth(source, 100) 
  end 
  end 
  end ) 
   

جرب المثال بالكلنت

Edited by Guest
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...