AR/addPedClothes: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "هذه الوظيفة تستخدم لاعطاء شخصيه او لاعب ملابس ==Syntax== <syntaxhighlight lang="lua"> bool addPedClothes ( ped thePed, string clothesTexture, string clo...")
 
(--Required Arguments)
Line 6: Line 6:
{{OOP||[[ped]]:addClothes||getPedClothes}}
{{OOP||[[ped]]:addClothes||getPedClothes}}


===Required Arguments===
===العناصر المطلوبة===
*'''thePed: الشخصيه التي تريد اعطائها ملابس'''
*'''thePed: الشخصيه التي تريد اعطائها ملابس'''
*'''clothesTexture: سلسلة تحديد الملابس التي سيتم اعطائها للشخصيه''' [[CJ Clothes|clothes catalog]].
*'''clothesTexture: سلسلة تحديد الملابس التي سيتم اعطائها للشخصيه''' [[CJ Clothes|clothes catalog]].

Revision as of 09:44, 12 August 2016

هذه الوظيفة تستخدم لاعطاء شخصيه او لاعب ملابس

Syntax

bool addPedClothes ( ped thePed, string clothesTexture, string clothesModel, int clothesType )

OOP Syntax Help! I don't understand this!

Method: ped:addClothes(...)
Counterpart: getPedClothes


العناصر المطلوبة

  • thePed: الشخصيه التي تريد اعطائها ملابس
  • clothesTexture: سلسلة تحديد الملابس التي سيتم اعطائها للشخصيه clothes catalog.
  • clothesModel: سلسلة تحديد رقم الملابس على القائمه clothes catalog.
  • clothesType: نوع الملابس التي سيتم اعطائها clothes catalog.

Returns

returns عندما لا يتم اعطاء الشخصيه ملابسfalse عندما يتم اعطاء الشخصيه ملابس, تكون القيمة true تكون القيمه

Click to collapse [-]
Server
function onEnterVehicle ( theVehicle, seat, jacked )
    if getElementModel ( theVehicle ) == 411 then  -- اذا كان رقم السياره كالتالي:
        addPedClothes ( source, "moto", "moto", 16 )   -- اعطاء الشخصيه ملابس
    end
end
addEventHandler ( "onPlayerVehicleEnter", root, onEnterVehicle )

See Also

Shared