Jump to content

تركيب كود


taha201100

Recommended Posts

اعرف انا لكن كيف اعرف وين الكود وش الي يحتاج تعديل مشان الاكواد الاخرى اقدر اركبها

الكود الي تعدله هو السيتاكس بس..

هم يعطونك فنكشنات و انت لازم تركبها مع بعض بشكل صحيح عشان يشتغل السكربت

عندك امثله تساعدك كيف ممكن تستخدم الفنكشن

Link to comment
ماني فاهم ولا راح افهم هات مثال طيب على الكود ذا وش تاخذ منه

ذذ

تشوف عندك الساينتاكس

killPed ( ped thePed, [ ped theKiller = nil, int weapon=255, int bodyPart=255, bool stealth = false ] ) 

هذه الي تاخذه و تعدله .. بس

مثال ..

مووجوود بالويكي

المثال يتحقق من المكان الي انضرب فيه الشخص اذا كان الرأس يموت

.........................

function headshotKill ( attacker, attackerweapon, bodypart, loss ) 
    if bodypart == 9 then --if the bodypart is the head 
        --kill the player, emulating the correct killer, weapon and bodypart. 
        killPed ( source, attacker, attackerweapon, bodypart ) 
    end 
end 
addEventHandler ( "onPlayerDamage", getRootElement(), headshotKill ) 

+

عندك ارقيمنت مطلوبه و ارقيمنت اختياريه

Required Arguments:

thePed: البيد المراد قتله

+

Optional Arguments:

theKiller: الشخص المسؤول عن الفتل

weapon: السلاح المقتول به

bodyPart: المنطقة بالجسم

.....

تقدر انك ما تحط الأرقمنت الأختياريه

وهو يعرف لك وش تسوي بالويكي

Link to comment

جرب اخوي

-client-

addEventHandler("onClientGUIClick",root,  
function () 
if source == اسم الزر then  
triggerServerEvent("kill", localPlayer)  
end 
end 
) 

-server-

addEvent("kil",true)  
addEventHandler("kil",root,  
function () 
killPed (source) 
end  
) 

طبعا من ناحية كيف تسوي الكود لا دخلتا للفنكشن الخاص فيه

لادخلت للفنكشن فيه

Syntax اساس الكود وهو

وتحت مسوين لك الكود انزل تحصل مثال

مثل هذا سطر من المثال

killPed ( source, attacker, attackerweapon, bodypart ) 

هذولا

attacker, attackerweapon, bodypart

تعدلهم ع حسب احتياجك او فكرتك للكود

killPed ( source ) 

لكن المهم و الاساس انك انك تسوي الحجج المطلوبة ام الاختيارية ع حسب الفكرة مثل ماذكرت فوق

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