Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. Will if you want your table : tabelPlayerGroup = {} markGroup = createMarker ( 1, 1, 1, 'cylinder', 1.5, 0, 0, 0, 0 ) groupobject = createObject( 980, 1, 1, 1 ) addEventHandler ( 'onMarkerHit', markGroup, function ( hitElement ) if getElementData ( hitElement, 'Group' ) == 'myGroupName' then -- i am get this from resource moveObject ( groupobject, 1000, 1, 1, 3 ) end end ) addEventHandler ( 'onMarkerLeave', markGroup, function ( leftElement ) getGroupPlayer() for i,p in ipairs ( tabelPlayerGroup ) do if getElementData ( leftElement,'Group') == 'myGroupName' and not isElementWithinMarker ( p, markGroup ) then -- i am get this from resource moveObject( groupobject, 1000, 1, 1, 1 ) end end end ) function getGroupPlayer ( ) for i,v in ipairs ( getElementsByType( 'player' ) ) do if getElementData ( v, 'Group' ) == 'myGroupName' then -- i am get this from resource table.insert( tabelPlayerGroup, v ) end end end
  2. local Object = createObject ( 980, 1270.5, -1650, 16, 0, 0 ,90 ) local Marker = createMarker ( 1272.3994140625, -1650.7998046875, 10.800000190735, 'cylinder', 18, 0, 0, 0, 0 ) open = false function OpenObject ( player ) if isElementWithinMarker ( player, Marker ) then if getElementData(player,"Group") == "KOL" then if not Open then moveObject ( Object, 1500, 1270.5, -1650, 8.1 ) else moveObject ( Object, 1500, 1270.5, -1650, 16 ) end Open = not Open else outputChatBox ( '* You must be 'KOL' !', player, 200, 0, 0, true ) end end end addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for _, v in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( v, 'tab', 'down', OpenObject ) end end ) addEventHandler ( 'onPlayerJoin', root, function ( ) bindKey ( source, 'tab', 'down', OpenObject ) end )
  3. markGroup = createMarker ( 1, 1, 1, 'cylinder', 1.5, 0, 0, 0, 0 ) groupobject = createObject( 980, 1, 1, 1 ) addEventHandler ( 'onMarkerHit', markGroup, function( hitElement ) if getElementData ( hitElement,'Group') == 'myGroupName' then -- i am get this from resource moveObject( groupobject, 1000, 1, 1, 3 ) end end ) addEventHandler ( 'onMarkerLeave', markGroup, function( leftElement ) if getElementData ( leftElement,'Group') == 'myGroupName' then -- i am get this from resource moveObject( groupobject, 1000, 1, 1, 1 ) end end )
  4. You need to create a map, It dosn't come with the group system .
  5. إقرأ الويكي أكثر +أكثر Lua إقرأ عن لغة و بعدين حاول تسوي مودآت
  6. PaiN^

    Car Mod Help

    It works ! If you have any trouble with the modloader go to the resource's topic and ask for help about your problem ( Maybe someone did before and you'll get an answer ) .
  7. guiCreateCheckBox 'onClientGUIClick' guiCheckBoxGetSelected
  8. PaiN^

    Car Mod Help

    Use the modeloader .
  9. PaiN^

    GUI help

    @ The Best : It's a resource ( search in the community ) . @ SuleymanM : Contact the maker, Sorry i don't know about that
  10. PaiN^

    FAKE SERVER!!!

    If Woovie shouldn't be a moderator, Then so all the MTA Team ! Read this : viewtopic.php?f=115&t=54447
  11. PaiN^

    Team Help

    addCommandHandler ( "criminal", function ( player ) if getPlayerTeam ( player ) == getTeamFromName ( "Criminal" ) then outputChatBox("* You Are Already On The 'Criminal' Team!",player,255,0,0) else setPlayerTeam ( player , Criminal ) outputChatBox("* You Have Been Joined Into The 'Criminal' Team! ",player,155,0,0) end end )
  12. PaiN^

    help :(

    Not Tested ! local check = 0 addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) while check == 0 do triggerEvent ( 'onChatClear', root, clear ) check = 1 end end ) function clear ( ) local done = 0 while done <= 200 do outputChatBox ( '', root ) done = done + 1 end setTimer ( function ( ) check = 0 end, 60000 * 5, 1 ) end addEvent ( 'onChatClear', true ) addEventHandler ( 'onChatClear', root, clear )
  13. !ما فهمت عليك ؟ + العفو ,,
  14. PaiN^

    Team Help

    True, But i think it's from the meta.xml . Anyway, We won't know until we get an answer from Tarek632 .
  15. I think it's from the race gamemode ( if you have the defult one ) . Try the script ith a different gamemode and see what happens .
  16. If so, Then you wont get any help This forum is to help you to learn MTA-Lua scripting or to help you with a code you have, Not to give you ready scripts !
  17. هذي تستخدمها عشان أشياء كثيرة, مثلا لو تبي تسوي مود ماركر يعطي فلوس مرة وحدة بس عشان تتحقق من ان اللاعب دخل الماركر ولا لا تستخدم هذي الفنكشنات, والكود يكون كذا marker = createMarker ( ... ) addEventHandler ( 'onMarkerHit', marker, function ( element ) if getElementType ( element ) == 'player' then -- نتحقق إن الشي إللي دخل الماركر لاعب if getElementData ( element, 'GotIn' ) == 'Yes' then -- Yes تساوي القيمة GotIn إذا الداتا المعرفة بإسم outputChatBox ( '! لقد دخلت مسبقاً', element ) return else -- Yes أما إذا الداتا ما تساوي القيمة givePlayerMoney ( element, 1000 ) -- نعطي اللاعب ألف setElementData ( element, 'GotIn', 'Yes' ) --- عشان لا يستخدم الماركر مرة ثانية Yes قيمتها تساوي GotIn نجعل الداتا end end end ) يعني الداتا هي شي إنت تحدده عشان تحفظ فيه شي تبغى تستخدمه لاحقاً
  18. engineImportTXD engineLoadTXD And there is a numberplate argument in the createVehicle function .
  19. أظن لو ألغوها كانوا كتبوا كذا بالويكي ! بس ماهم كاتبين شي
  20. PaiN^

    Argument 2

    جرب تحط ملف الكلنت فوق السيرفر في المبتا > ="client.lua" type="client" /> ="server.lua" type="server" />> + وجرب refresh سوي
  21. PaiN^

    Argument 2

    طيب أطرح التريقر حق الكلنت
×
×
  • Create New...