AR/setPlayerWantedLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "يتم استخدام هذه الدالة لتعيين مستوى نجوم اللاعب. يشار إلى المستوى النجوم بمقدار نجوم لاعب لديه عل...")
 
(No difference)

Latest revision as of 18:36, 21 March 2014

يتم استخدام هذه الدالة لتعيين مستوى نجوم اللاعب. يشار إلى المستوى النجوم بمقدار نجوم لاعب لديه على GTA واجهة اللعبة.

التركيب

bool setPlayerWantedLevel ( player thePlayer, int stars )            

خصائص المطلوبة

  • thePlayer: اللاعب المراد ضبط له عدد النجوم
  • stars: عدد صحيح من 0 الى 6 يمثل عدد مستوى النجوم

عوائد

Returns true if the wanted level was set successfully, false if any of the arguments were invalid.

مثال

هذا المثال يعطي اللاعب 6 نجوم اذا دخل الى منطقة معينة

-- 'policeStation' نفترض ان هناك منطقة اسمها
function policeStationHit ( thePlayer ) 
   setPlayerWantedLevel ( thePlayer, 6 ) -- اعطاء اللاعب 6 نجوم
   outputChatBox ( getPlayerName ( thePlayer ) .. " دخل مقر الشرطة" )
end
-- سمي 'policeStationHit' عندما يدخل الى المنطقة:
addEventHandler ( "onColShapeHit", policeStation, policeStationHit )