mr.ekoo Posted January 17, 2013 Share Posted January 17, 2013 السلام عليكم سؤالي انا حطيت شخصية من الماب والايدي حقها 300 وطلعت وكل شيئ تمام لاكن عندي سؤال كيف اخليها تحمل سلاح وتطلق على فريق معين ؟ Link to comment
iPrestege Posted January 17, 2013 Share Posted January 17, 2013 قصدك عندك تيم وتبي تعطية سلآح؟ Link to comment
Bhrany-danger Posted January 17, 2013 Share Posted January 17, 2013 فـي كود جاهز -- عناد مسويه -- Server Side thePed = createPed ( 282, 1513.3770751953, -1677.8481445313, 14.046875 ) theMarker = createMarker ( 0, 0, 0, "cylinder", 15, 0, 0, 0, 0 ) setPedStat ( thePed, 77, 999 ) setPedWeaponSlot ( thePed, 3 ) attachElements ( theMarker, thePed, 0, 0, -1 ) setTimer ( giveWeapon, 5000, 0, thePed, 30, 99999, true ) addEventHandler ( "onMarkerHit", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getElementType ( thePlayer ) == "player" then if getPlayerTeam ( thePlayer ) == getTeamFromName ( "Skulls" ) then triggerClientEvent ( thePlayer, "setPedAttacking", thePlayer, thePed ) if isPedInVehicle ( thePlayer ) then destroyElement ( getPedOccupiedVehicle ( thePlayer ) ) end end end end ) addEventHandler ( "onMarkerLeave", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getElementType ( thePlayer ) == "player" then triggerClientEvent ( thePlayer, "setPedStanding", thePlayer, thePed ) setTimer ( giveWeapon, 500, 1, thePed, 30, 99999, true ) end end ) -- Client Side addEvent ( "setPedAttacking", true ) addEventHandler ( "setPedAttacking", root, function ( thePed ) setTimer ( function ( ) x, y, z = getElementPosition ( localPlayer ) setPedAimTarget ( thePed, x, y, z ) end , 100, 0 ) setPedControlState ( thePed, "fire", true ) outputChatBox ( "* Start Shooting !!!", 255, 255, 0, true ) end ) addEvent ( "setPedStanding", true ) addEventHandler ( "setPedStanding", root, function ( thePed ) setPedControlState ( thePed, "fire", false ) outputChatBox ( "* Stop Shooting !!!", 255, 255, 0, true ) for _, x3NAD in ipairs ( getTimers ( 100 ) ) do killTimer ( x3NAD ) end end ) Link to comment
mr.ekoo Posted January 17, 2013 Author Share Posted January 17, 2013 اخوي لو سمحت هذي الشخصية لو ضربتها تضربك ابغا من احد يجي جنب الشخصية تضربه للعلم يكون من فريق محدد يعني مو الفرقات تضربهم فهمتني ؟ Link to comment
Bo7meeeD Posted January 17, 2013 Share Posted January 17, 2013 اخوي لو سمحت هذي الشخصية لو ضربتها تضربكابغا من احد يجي جنب الشخصية تضربه للعلم يكون من فريق محدد يعني مو الفرقات تضربهم فهمتني ؟ thePed = createPed ( 282, 1513.3770751953, -1677.8481445313, 14.046875 ) theMarker = createMarker ( 1513.5129394531, -1675.0975341797, 14.046875, "cylinder", 15, 0, 0, 0, 0 ) setPedStat ( thePed, 77, 999 ) setPedWeaponSlot ( thePed, 3 ) attachElements ( theMarker, thePed, 0, 0, -1 ) setTimer ( giveWeapon, 5000, 0, thePed, 30, 99999, true ) addEventHandler ( "onMarkerHit", getResourceRootElement ( getThisResource ( ) ), function ( hitPlayer ) if (getTeamName(getPlayerTeam(hitPlayer)) == "team") then if getElementType ( hitPlayer ) == "player" then if getPlayerTeam ( hitlayer ) == getTeamFromName ( "Skulls" ) then triggerClientEvent ( hitPlayer, "setPedAttacking", hitPlayer, thePed ) if isPedInVehicle ( hitPlayer ) then destroyElement ( getPedOccupiedVehicle ( hitPlayer ) ) else cancelEvent () end end end end end ) addEventHandler ( "onMarkerLeave", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getElementType ( thePlayer ) == "player" then triggerClientEvent ( thePlayer, "setPedStanding", thePlayer, thePed ) setTimer ( giveWeapon, 500, 1, thePed, 30, 99999, true ) end end ) Link to comment
===|OSAMA|=== Posted January 18, 2013 Share Posted January 18, 2013 اخوي لو سمحت هذي الشخصية لو ضربتها تضربكابغا من احد يجي جنب الشخصية تضربه للعلم يكون من فريق محدد يعني مو الفرقات تضربهم فهمتني ؟ thePed = createPed ( 282, 1513.3770751953, -1677.8481445313, 14.046875 ) theMarker = createMarker ( 1513.5129394531, -1675.0975341797, 14.046875, "cylinder", 15, 0, 0, 0, 0 ) setPedStat ( thePed, 77, 999 ) setPedWeaponSlot ( thePed, 3 ) attachElements ( theMarker, thePed, 0, 0, -1 ) setTimer ( giveWeapon, 5000, 0, thePed, 30, 99999, true ) addEventHandler ( "onMarkerHit", getResourceRootElement ( getThisResource ( ) ), function ( hitPlayer ) if (getTeamName(getPlayerTeam(hitPlayer)) == "team") then if getElementType ( hitPlayer ) == "player" then if getPlayerTeam ( hitlayer ) == getTeamFromName ( "Skulls" ) then triggerClientEvent ( hitPlayer, "setPedAttacking", hitPlayer, thePed ) if isPedInVehicle ( hitPlayer ) then destroyElement ( getPedOccupiedVehicle ( hitPlayer ) ) else cancelEvent () end end end end end ) addEventHandler ( "onMarkerLeave", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getElementType ( thePlayer ) == "player" then triggerClientEvent ( thePlayer, "setPedStanding", thePlayer, thePed ) setTimer ( giveWeapon, 500, 1, thePed, 30, 99999, true ) end end ) WTF !!! ^ مسوي ترايقر و الكود سيرفر وبس , وين الكلنت ؟ triggerClientEvent ( hitPlayer, "setPedAttacking", hitPlayer, thePed ) + triggerClientEvent ( thePlayer, "setPedStanding", thePlayer, thePed ) Link to comment
Bo7meeeD Posted January 18, 2013 Share Posted January 18, 2013 اخوي لو سمحت هذي الشخصية لو ضربتها تضربكابغا من احد يجي جنب الشخصية تضربه للعلم يكون من فريق محدد يعني مو الفرقات تضربهم فهمتني ؟ thePed = createPed ( 282, 1513.3770751953, -1677.8481445313, 14.046875 ) theMarker = createMarker ( 1513.5129394531, -1675.0975341797, 14.046875, "cylinder", 15, 0, 0, 0, 0 ) setPedStat ( thePed, 77, 999 ) setPedWeaponSlot ( thePed, 3 ) attachElements ( theMarker, thePed, 0, 0, -1 ) setTimer ( giveWeapon, 5000, 0, thePed, 30, 99999, true ) addEventHandler ( "onMarkerHit", getResourceRootElement ( getThisResource ( ) ), function ( hitPlayer ) if (getTeamName(getPlayerTeam(hitPlayer)) == "team") then if getElementType ( hitPlayer ) == "player" then if getPlayerTeam ( hitlayer ) == getTeamFromName ( "Skulls" ) then triggerClientEvent ( hitPlayer, "setPedAttacking", hitPlayer, thePed ) if isPedInVehicle ( hitPlayer ) then destroyElement ( getPedOccupiedVehicle ( hitPlayer ) ) else cancelEvent () end end end end end ) addEventHandler ( "onMarkerLeave", getResourceRootElement ( getThisResource ( ) ), function ( thePlayer ) if getElementType ( thePlayer ) == "player" then triggerClientEvent ( thePlayer, "setPedStanding", thePlayer, thePed ) setTimer ( giveWeapon, 500, 1, thePed, 30, 99999, true ) end end ) WTF !!! ^ مسوي ترايقر و الكود سيرفر وبس , وين الكلنت ؟ triggerClientEvent ( hitPlayer, "setPedAttacking", hitPlayer, thePed ) + triggerClientEvent ( thePlayer, "setPedStanding", thePlayer, thePed ) الكود ككامل موجود فوق انا عدلت له السيرفر بس اهو يبي لتيم معين سويته والكلنت ماتغير Link to comment
===|OSAMA|=== Posted January 18, 2013 Share Posted January 18, 2013 الكود ككامل موجود فوق انا عدلت له السيرفر بساهو يبي لتيم معين سويته والكلنت ماتغير اهآ ذذ , بس لو حطيت له الكلنت او قلت له انه فوق يكون احسن لأنه هو ما رح يعرف الي بعقلكـ Link to comment
mr.ekoo Posted January 18, 2013 Author Share Posted January 18, 2013 طيب من وين احدد الفريق الى يضربه ؟ Link to comment
Mr.T9 Posted January 18, 2013 Share Posted January 18, 2013 بدل team بالتيم اللي تبيه يضربه Link to comment
mr.ekoo Posted January 20, 2013 Author Share Posted January 20, 2013 شكرا اشتغل الحين الف شكر للي ساعدوني Link to comment
Bo7meeeD Posted January 20, 2013 Share Posted January 20, 2013 شكرا اشتغل الحينالف شكر للي ساعدوني العفوو 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