SycroX Posted November 27, 2015 Share Posted November 27, 2015 وش فانكشن يخلي اللاعب ينط نطة عالية + فانكشن يخالي اللاعب سريع لاعب بس مو كل اللاعبين Link to comment
SycroX Posted November 27, 2015 Author Share Posted November 27, 2015 شو ما في مساعدة ليه Link to comment
Rockyz Posted November 27, 2015 Share Posted November 27, 2015 Client Side setWorldSpecialPropertyEnabled اذا تبي السرعة تبان فقط للاعب استخدم في الكلنت setGameSpeed اذا تبي تبان للكل وانت بس الي تتفعل معك استخدم تريقر Link to comment
ALw7sH Posted November 27, 2015 Share Posted November 27, 2015 استخدم setElementVelocity لسرعة اللاعب افضل Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 ممكان مثال علي setElementVelocity مثال الويكي مو موضحها Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 ممكان مثال علي setElementVelocity مثال الويكي مو موضحها اذا انت مبرمج اول شي لازم تنتبه الى الساينتكس bool setElementVelocity ( element theElement, float speedX, float speedY, float speedZ ) Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 جرب كذا : 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
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 (edited) اوك فهمت Edited November 28, 2015 by Guest Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 (edited) اوك Edited November 28, 2015 by Guest Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 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
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 لسا بردو مو شغال Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 (edited) 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 November 28, 2015 by Guest Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 لسا بردو اعطي روحي 10 نقاط و ما يصير شي Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 لسا بردو اعطي روحي 10 نقاط و ما يصير شي جرب الكود مرة الثانية اذا ماشتغل شف الديبق Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 الدي بق ما يقول الي bad argument Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 جرب الكود مرة ثانية طيب وقول ليي سطر كم Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 (edited) لسا بردو يقول في 15 Edited November 28, 2015 by Guest Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 (edited) 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 November 28, 2015 by Guest Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 (edited) نفس الحكاية Edited November 28, 2015 by Guest Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 نفس الحكاية و المرة دي سطر 17 local points = tonumber ( getElementData ( localPlayer, "PointsKill" ) ) or 0 جرب مرة ثانية خخ Link to comment
SycroX Posted November 28, 2015 Author Share Posted November 28, 2015 (edited) مشكور Edited November 28, 2015 by Guest Link to comment
Rockyz Posted November 28, 2015 Share Posted November 28, 2015 (edited) 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 November 29, 2015 by Guest 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