Jump to content

مساعده صغيره


EdeN

Recommended Posts

سلام عليكم

انا عندي طلب

هذا الكود حق شراء اسلاحه انا ابي يشبه حق شراء سيارات

BuyWeapon(1000,30,1000,"AK47") 

:D

عندي شي ثاني

انا ابي انشر سيرفر واخلي ناس كثير يدخلون

كل هذي سويتهم ولا نفعه

نشرت ماصار شيء

كتبت توزيع ثنين او 3 دخلووو

الي عنده فكرهـ يجاوبني وراح اكون له مشكووووووور

Link to comment
BuyWeapon(1000,30,1000,"AK47") 

أخي هذا ليس كود أعطاء سلاح !

هذا هوا الكود الصحيح

GiveWeapon

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

Link to comment
كود اخذ النقود
if ( PlayerMoney >= 00) then 

بدل 00 بـ الفلوس التي تريد وضعها

وتحتاج كود ثاني

takePlayerMoney(source,00)  

فيه فرق هذا

اذا كات عند الاعب 00

if ( PlayerMoney >= 00) then 

اخذ منه 00

takePlayerMoney(source,00)  

يعني زبدت الموضوع انه الأأخذ هو السطر الثاني وياريت انك استفدت يا مستر تن

Link to comment
كود اخذ النقود
if ( PlayerMoney >= 00) then 

بدل 00 بـ الفلوس التي تريد وضعها

وتحتاج كود ثاني

takePlayerMoney(source,00)  

فيه فرق هذا

اذا كات عند الاعب 00

if ( PlayerMoney >= 00) then 

اخذ منه 00

takePlayerMoney(source,00)  

يعني زبدت الموضوع انه الأأخذ هو السطر الثاني وياريت انك استفدت يا مستر تن

-_-

Link to comment

اذا كنت تقصد عند ضغط زر يعطي الاعب سياره جرب هذا

id = 411 -- لتسهيل يمكنك تعديل رقم اي دي السياره من هنا 
function Veh( thePlayer ) 
if (source == ButtonName) then 
if not isPedInVehicle(thePlayer) then 
x,y,z = getElementPosition( thePlayer ) 
Vehicle = createVehicle ( id, x, y, z ) 
warpPedIntoVehicle(thePlayer,Vehicle) 
end 
end 
addEventHandler("onClientGUIClick",Veh) 

Link to comment
اذا كنت تقصد عند ضغط زر يعطي الاعب سياره جرب هذا
id = 411 -- لتسهيل يمكنك تعديل رقم اي دي السياره من هنا 
function Veh( thePlayer ) 
if (source == ButtonName) then 
if not isPedInVehicle(thePlayer) then 
x,y,z = getElementPosition( thePlayer ) 
Vehicle = createVehicle ( id, x, y, z ) 
warpPedIntoVehicle(thePlayer,Vehicle) 
end 
end 
addEventHandler("onClientGUIClick",Veh) 

خرابيط تايم

Link to comment
اذا كنت تقصد عند ضغط زر يعطي الاعب سياره جرب هذا
id = 411 -- لتسهيل يمكنك تعديل رقم اي دي السياره من هنا 
function Veh( thePlayer ) 
if (source == ButtonName) then 
if not isPedInVehicle(thePlayer) then 
x,y,z = getElementPosition( thePlayer ) 
Vehicle = createVehicle ( id, x, y, z ) 
warpPedIntoVehicle(thePlayer,Vehicle) 
end 
end 
addEventHandler("onClientGUIClick",Veh) 

اخطاء ×××××××

addEventHandler وين attachedTo

الحدث onClientGUIClick والوظيفه الي فيه سيرفر خطا لازم تريقير

بعهدين thePlayer تصير localPlayer

Link to comment
اذا كنت تقصد عند ضغط زر يعطي الاعب سياره جرب هذا
id = 411 -- لتسهيل يمكنك تعديل رقم اي دي السياره من هنا 
function Veh( thePlayer ) 
if (source == ButtonName) then 
if not isPedInVehicle(thePlayer) then 
x,y,z = getElementPosition( thePlayer ) 
Vehicle = createVehicle ( id, x, y, z ) 
warpPedIntoVehicle(thePlayer,Vehicle) 
end 
end 
addEventHandler("onClientGUIClick",Veh) 

وين تعلمت برمجه انت

:lol::lol::lol::lol:

Link to comment

--Client Side--

addEventHandler ("onClientGUIClick", getRootElement(), 
function() 
if ( source ==  NameButton ) then  
triggerServerEvent("give",getLocalPlayer())  
end  
end)  

--Server Side--

addEvent("give",true)  
addEventHandler("give",root,  
function() 
if not isPedInVehicle(source) then 
x,y,z = getElementPosition( source ) 
Vehicle = createVehicle ( 411, x, y, z ) 
warpPedIntoVehicle(source,Vehicle) 
end  
end)  

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