AL-SAYED Posted July 2, 2013 Share Posted July 2, 2013 ويش الفكشن الي يكشف على اسلحه اللاعب اذا السلاح موجود يسوي امر Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 giveWeapon addEventHandler وش بلاك ؟ Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 function giveWeaponsOnSpawn ( theSpawnpont, theTeam ) giveWeapon ( source, 31, 200 ) -- Gives the M4 weapon with 200 ammo end addEventHandler ( "onPlayerSpawn", getRootElement(), giveWeaponsOnSpawn ) -- attach the event handler function consoleGive ( thePlayer, commandName, weaponID, ammo ) local status = giveWeapon ( thePlayer, weaponID, ammo, true ) -- attempt to give the weapon, forcing it as selected weapon if ( not status ) then -- if it was unsuccessful outputConsole ( "Failed to give weapon.", thePlayer ) -- tell the player end end addCommandHandler ( "give", consoleGive ) ped = createPed( 19, -1634.5775, 1203.85, 7.1796 ) addCommandHandler( "give", function ( player, command, id, amount ) if not tonumber ( id ) then return end if not tonumber ( amount ) then amount = 9001 end giveWeapon( ped, id, amount, true ) end ) اتمنا افدتك Link to comment
AL-SAYED Posted July 2, 2013 Author Share Posted July 2, 2013 ماقلت يعطي سلاح EDIT قلت اذا السلاح موجود مع اللاعب يسوي امر Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 if getPedWeapon ( player ) == id Link to comment
AboShanab Posted July 2, 2013 Share Posted July 2, 2013 if getPedWeapon ( player ) == id وش جالس تسوي كارثه كل اكوادك غلط Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 if getPedWeapon ( player ) == id وش جالس تسوي كارثه كل اكوادك غلط هاد صح الي فوق ما كنت فاهم طلبه Link to comment
AboShanab Posted July 2, 2013 Share Posted July 2, 2013 اظن ان ما في فكششن اذا كان الاعب معه سلاح معين او استخدم .. getPedWeapon بس اظن انها ما تضبط الا مع البيد مدري والله Link to comment
AboShanab Posted July 2, 2013 Share Posted July 2, 2013 if getPedWeapon ( player ) == id وش جالس تسوي كارثه كل اكوادك غلط هاد صح الي فوق ما كنت فاهم طلبه طيب لو انه صح الاصلاح له كذا if getPedWeapon ( player ) == id then .. Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 اظن ان ما في فكششن اذا كان الاعب معه سلاح معيناو استخدم .. getPedWeapon بس اظن انها ما تضبط الا مع البيد مدري والله وانا وش عطيته ؟ Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 -- Find a player called someguy and find his current weapon id. local weaponType = getPedWeapon ( getRandomPlayer() ) -- If a weapon type was returned then if ( weaponType ) then outputChatBox ( "someguy's current Weapon-type: " .. weaponType .. "." ) -- Display the weapon type in the chat box end Link to comment
AboShanab Posted July 2, 2013 Share Posted July 2, 2013 -- Find a player called someguy and find his current weapon id. local weaponType = getPedWeapon ( getRandomPlayer() ) -- If a weapon type was returned then if ( weaponType ) then outputChatBox ( "someguy's current Weapon-type: " .. weaponType .. "." ) -- Display the weapon type in the chat box end ذا مثال الويكي اظن انه لو يبي يتعلم للفكشن يروح الويكي او يسوي الوظيفة واذا كان في غلط يطرحها لنا .. Link to comment
Mr-Kartha Posted July 2, 2013 Share Posted July 2, 2013 -- Find a player called someguy and find his current weapon id. local weaponType = getPedWeapon ( getRandomPlayer() ) -- If a weapon type was returned then if ( weaponType ) then outputChatBox ( "someguy's current Weapon-type: " .. weaponType .. "." ) -- Display the weapon type in the chat box end ذا مثال الويكي اظن انه لو يبي يتعلم للفكشن يروح الويكي او يسوي الوظيفة واذا كان في غلط يطرحها لنا .. عطيته مثال على هاذي : getPedWeapon Link to comment
PaiN^ Posted July 3, 2013 Share Posted July 3, 2013 getWeaponNameFromID و getPedWeapon إستخدم * getPedTotalAmmo مو دايما تجيب النتيجة الصحيحة, عشان كذا لازم تستخدم معاها getPedWeapon ترى Link to comment
AL-SAYED Posted July 3, 2013 Author Share Posted July 3, 2013 addEventHandler( "onClientElementColShapeHit",CHT2, function ( ThePlayer ) if( getElementType( source ) == "vehicle" ) and ( isPedInVehicle ( ThePlayer ) )then setElementFrozen ( vehicle,true ); local weaponType = getPedWeapon (localPlayer ) local weponid = getWeaponNameFromID ( 3 ) if ( weponid == 3 ) setElementFrozen ( vehicle,false ); end end end ) Link to comment
iMr.Dawix~# Posted July 3, 2013 Share Posted July 3, 2013 addEventHandler( "onClientElementColShapeHit",CHT2, function ( ThePlayer ) if( getElementType( source ) == "vehicle" ) and ( isPedInVehicle ( ThePlayer ) )then setElementFrozen ( vehicle,true ); local weaponType = getPedWeapon (localPlayer ) local weponid = getWeaponNameFromID ( 3 ) if ( weponid == 3 ) setElementFrozen ( vehicle,false ); end end end ) getWeaponIDFromName Link to comment
PaiN^ Posted July 4, 2013 Share Posted July 4, 2013 addEventHandler( "onClientElementColShapeHit", CHT2, function( element ) if getElementType( element ) == "vehicle" then local thePlayer = getVehicleOccupant( element, 0 ) if not thePlayer then return end setElementFrozen( element,true ) local weaponType = getPedWeapon( thePlayer ) local totalAmmo = getPedTotalAmmo( thePlayer ) if weaponType == 3 and totalAmmo > 0 then setElementFrozen( element, false ) end end end ) Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 addEventHandler( "onClientElementColShapeHit", CHT2, function( element ) if getElementType( element ) == "vehicle" then local thePlayer = getVehicleOccupant( element, 0 ) if not thePlayer then return end setElementFrozen( element,true ) local weaponType = getPedWeapon( thePlayer ) local totalAmmo = getPedTotalAmmo( thePlayer ) if weaponType == 3 and totalAmmo > 0 then setElementFrozen( element, false ) end end end ) theShape: the colshape that the element entered. onClientElementColShapeHit Link to comment
PaiN^ Posted July 4, 2013 Share Posted July 4, 2013 خخخ onClientColShapeHit حسبتها addEventHandler( "onClientElementColShapeHit", CHT2, function( ) if getElementType( source ) == "vehicle" then local thePlayer = getVehicleOccupant( source, 0 ) if not thePlayer then return end setElementFrozen( source,true ) local weaponType = getPedWeapon( thePlayer ) local totalAmmo = getPedTotalAmmo( thePlayer ) if weaponType == 3 and totalAmmo > 0 then setElementFrozen( source, false ) end end end ) Link to comment
AL-SAYED Posted July 4, 2013 Author Share Posted July 4, 2013 شلون اطلع الكول اذا اكتب /showcol يطلع showcol is now set to 1 showcol will have no effect because development mode is off Link to comment
فاّرس Posted July 4, 2013 Share Posted July 4, 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