Jump to content

طلب كود


MOMO3011

Recommended Posts

كيف يعني اساعدك ساعدتك انا الباقي عليك , اضغط على كل كود وشف له مثال

اسهل من كذا مافيه

مبتدي اتعلم

المبتدي مب يعني نعطيك اكواد جاهزه

تبي تتعلم اضغط على كل كود

وتسوي اكواد بنفسك ولا تتعتمد على المنتدى ,, لاكن

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

وكل مره راح تقول ابي اكواد جاهزه ابي اكواد جاهزه !

تعلم احسن لك

هنا نصحح لك كود

نساعدك في كود

تبي تتعلم نساعدك

عندك كود ما عرفته كذا

بس مب تجي تطلب كود ونعطيك كود كااامل

جاهز

ماعليك الا تنسخ وتلصق

طيب وش سوينا كذا ؟

لا انت استفدت ولا غيرك استفاد

اتمنى وضحت المعلومه !

Link to comment
Event # 
'onPlayerLogin' 
  
function # 
getAccountName 
getPlayerAccount 
isObjectInACLGroup 
setElementModel 

الكونسل ما يموت

Event # 
'onClientPlayerDamage' 
  
function # 
triggerServerEvent 
addEvent 
addEventHandler 
getAccountName 
getPlayerAccount 
isObjectInACLGroup 
cancelEvent 

اخي ,,

يقدر يخلي الايفنت 'onPlayerDamage'

ويشيل الترايقر ويصير الكود كامل سيرفر :roll:

Link to comment
لكن كيف اعرف الكلنت من السيرفر

شوف مثلاً الأفنت هذا

https://wiki.multitheftauto.com/wiki/OnPlayerDamage

لما تدخل على الرابط بتشوف فوق كلام بالبرتقالي

Serverside event

يعني الأفنت سيرفر فقط

أو مثلاً الفنكشن هذا

https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup

مكتوب فوق

Server-only function

يعني سيرفر فقط

Link to comment
شاهد معي ..

مثال بسيط ..

local id = 0 
local ammo = 20 
      
addEventHandler ( 'onPlayerJoin', root, function ( ) 
    if ( id and ammo) then 
        giveWeapon(source,id,ammo) 
        outputChatBox ( "#FF0000تم اعطائك سلاح  .. ", source, 255, 255, 255, true ) 
    end 
end ) 
      

طبعا في اكواد وهي

outputChatBox

giveWeapon

if .. then..and

local

addEventHandler

onPlayerJoin

وانت لازم تركبهم بطريقه صحيحه

وكذا برمجه

# :wink:

احس هذا التحقق ما منه فايده if ( id and ammo) then

Link to comment

دا كود صحيح ?

مع العلم انني خليت سكن رقم 33 لاسل كنسل

function outputOnLogin ( previous_account, current_account, auto_login )  
    outputConsole(getAccountName(previous_account).." Logged into "..getAccountName(current_account))  
end 
addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin ) 
  
function setMoney(thePlayer,key,amount) 
    setPlayerMoney (thePlayer,amount) 
    local account = getPlayerAccount(thePlayer) 
    if account and tonumber(amount) then 
        setAccountData(account,"money",amount) 
    end 
end 
addCommandHandler("setmoney",setMoney) 
  
addCommandHandler ( "jetpack", 
    function ( thePlayer ) 
        if doesPedHaveJetPack ( thePlayer ) then  
            removePedJetPack ( thePlayer )  
            return  
        end 
   
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then  
          if not doesPedHaveJetPack ( thePlayer ) then  
               givePedJetPack ( thePlayer )  
          end 
     end 
end 
) 
addCommandHandler ( "changeveh", 
    function ( thePlayer, command, newModel ) 
        local theVehicle = getPedOccupiedVehicle ( thePlayer )  
        newModel = 33 ( newModel )             
        if theVehicle and newModel then                         
            setElementModel ( theVehicle, newModel ) 
        end 
    end 
) 

Link to comment
دا كود صحيح ?

مع العلم انني خليت سكن رقم 33 لاسل كنسل

function outputOnLogin ( previous_account, current_account, auto_login )  
    outputConsole(getAccountName(previous_account).." Logged into "..getAccountName(current_account))  
end 
addEventHandler("onPlayerLogin",getRootElement(),outputOnLogin ) 
  
function setMoney(thePlayer,key,amount) 
    setPlayerMoney (thePlayer,amount) 
    local account = getPlayerAccount(thePlayer) 
    if account and tonumber(amount) then 
        setAccountData(account,"money",amount) 
    end 
end 
addCommandHandler("setmoney",setMoney) 
  
addCommandHandler ( "jetpack", 
    function ( thePlayer ) 
        if doesPedHaveJetPack ( thePlayer ) then  
            removePedJetPack ( thePlayer )  
            return  
        end 
   
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then  
          if not doesPedHaveJetPack ( thePlayer ) then  
               givePedJetPack ( thePlayer )  
          end 
     end 
end 
) 
addCommandHandler ( "changeveh", 
    function ( thePlayer, command, newModel ) 
        local theVehicle = getPedOccupiedVehicle ( thePlayer )  
        newModel = 33 ( newModel )             
        if theVehicle and newModel then                         
            setElementModel ( theVehicle, newModel ) 
        end 
    end 
) 

:idea::o:shock:

وش تبغي تسوي ؟؟

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