Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. حلو كبداية لكـ ,, إستمر ونبغى نشوف تطور بإذن الله ,,
  2. +1 طفشت من ترتيب أكوادهم, سرت بس انسخها واعدلها وارجعها
  3. PaiN^

    index

    If you mean that is it necessary to be "index, player" then No, You can but whatever you want . for k,v ... for index,player ... for i, anything ...
  4. أخوي انت حاط اسم الكول بالحدث .. والمصدر بالحدث هو العنصر الي يدخل الكول، يعني بهالحالة ذي انت حددت اسم متغير العنصر الي يدخل الكول المهم يصير كودكـ كذا .. -- Client Side # addEventHandler( "onClientElementColShapeHit", root, function( theCol ) if theCol == CHT2 and getElementType( source ) == "vehicle" then local thePlayer = getVehicleOccupant( source, 0 ) if not thePlayer then return end setElementFrozen( source, true ) local weaponType = getPedWeapon( thePlayer ) local totalAmmo = getPedTotalAmmo( thePlayer ) if weaponType == 3 and totalAmmo > 0 then setElementFrozen( source, false ) end end end ) ×.× مدري وشبه ذا الكود مضارب معاي مشكوور عالتعديل ,,
  5. شوف بالنسبة للوظائف : guiCreateWindow guiCreateGridList guiGridListAddColumn GUIEditor هذي كلها تسويها بمود أما الباقي : table > تسوي جدول تخزن فيه أسماء وايديات السكنات pairs or next > تسوي لووب للجدول, وتجيب السكنات المخزنة فيه guiGridListAddRow > لإضافة رو يعني سطر guiGridListSetItemText > للكتابة في السطر إللي ضفناه guiGridListSetItemData > تحط داتا معينة لكل سطر "onClientGUIClick" > تضيف حدث عند الضغط على النافذة, وطبعا تتحقق من انه الزر اللي انضغط guiGridListGetSelectedItem > تجيب الشي المختار في القريد, يعني السطر اللي اختاروه guiGridListGetItemText > تجيب نص الشي المختار guiGridListGetItemData > guiGridListSetItemData تجيب الداتا إللي خزنتها أول بإستخدام triggerServerEvent > ترسل المعلومات للسيرفر setElementModel > تغير شخصية اللاعب
  6. PaiN^

    Chat Box !

    كيف مالها داعي, بطريقة عناد ما راح يطلع بالشات إلا أول كلمة جرب كذا : addCommandHandler( "Admins", function( player, cmd, ... ) if ... then local msg = table.concat( { ... }, " " ) local playerAccount = getPlayerAccount( player ) if playerAccount and not isGuestAccount( playerAccount ) then if isObjectInACLGroup( "user."..getAccountName( playerAccount ), aclGetGroup( "Admin" ) ) then for _, v in ipairs( getElementsByType( "player" ) ) do local playersAccount = getPlayerAccount( v ) if playersAccount and not isGuestAccount( playersAccount ) then if isObjectInACLGroup( "user."..getAccountName( playersAccount ), aclGetGroup( "Admin" ) ) then outputChatBox( getPlayerName( player )..": "..msg, v, 255, 255, 255, true ) end end end end end end end ) addEventHandler( "onResourceStart", resourceRoot, function( ) for _, v in ipairs( getElementsByType( "player" ) ) do bindKey( v, "u", "down", "chatbox", "Admins" ) end end ) addEventHandler( "onPlayerJoin", root, function( ) bindKey( source, "u", "down", "chatbox", "Admins" ) end )
  7. العفو, لو ما عرفتله إرجعلنا نساعدكـ
  8. - فنكشن الحدث جاي بعد تحقق - الفنكشن المفروض يكون خارج الحدث, مو داخله عالعموم صلحته لكـ : local marker = createMarker(5411,738,138, "corona", 3, 255, 0, 0, 255) local move = createObject(3437, 5412,793,126, 0, 0, 0) local omg1017 = createObject(3437, 5412, 793, 126, 0, 0, 0) local points = { } function omgMoveomg1017( point ) if point == 1 then moveObject( omg1017, 5000, 5412, 793, 162.40542602539, 0, 0, 0 ) setTimer( omgMoveomg1017, 5000, 1, 2 ) elseif point == 2 then moveObject( omg1017, 5000, 5413.34765625, 793, 173.93621826172, 0, 13.333312988281, 0 ) setTimer( omgMoveomg1017, 5000, 1, 3 ) elseif point == 3 then setTimer( omgMoveomg1017, 5000, 1, 1 ) end end addEventHandler( "onMarkerHit", marker, function( player ) if getElementType(player) == "player" then if points[player] then if points[player] >= 3 then points[player] = 0 end points[player] = points[player] + 1 else points[player] = 1 end omgMoveomg1017( points[player] ) end end )
  9. table guiCreateWindow guiCreateGridList guiGridListAddColumn pairs or next guiGridListAddRow guiGridListSetItemText guiGridListSetItemData "onClientGUIClick" guiGridListGetSelectedItem guiGridListGetItemText guiGridListGetItemData triggerServerEvent setElementModel
  10. addEventHandler ( "onClientGUIClick", root, function () if source == GUIEditor.button[8] then guiSetText ( GUIEditor.button[1] ,"~ Suicide ~" ) guiSetText ( GUIEditor.button[2] ,"~> Cancel gravity <~" ) guiSetText ( GUIEditor.button[3] ,"~> Hide or show chat <~" ) guiSetText ( GUIEditor.button[4] ,"~> Hide or show my body <~" ) guiSetText ( GUIEditor.button[5] ,"~> Hide or show my car <~" ) guiSetText ( GUIEditor.button[6] ,"~> Make time 12 am <~" ) guiSetText ( GUIEditor.button[7] ,"~> Make time 1 am <~" ) end end)
  11. In the acl.xml file, set the access vlue to false in the groups you don't want to give access to . name="command.aexec" access="false" >>
  12. To output the message to every one in chat, You'll have to send a trigger to the server-side, Because outputChatBox client-side dosn't have a element argument . I'v fixed the code, The trigger is on you : function cmdPlaySound( cmd, file ) if not file then return outputChatBox( "[uSAGE] /startmusic [name]" ) end if playSound ( "sounds/" .. file .. ".mp3" ) then outputChatBox( "Is Playing " .. file, 255, 255, 255 ) end end addCommandHandler( "startmusic", cmdPlaySound )
  13. خخخ onClientColShapeHit حسبتها addEventHandler( "onClientElementColShapeHit", CHT2, function( ) if getElementType( source ) == "vehicle" then local thePlayer = getVehicleOccupant( source, 0 ) if not thePlayer then return end setElementFrozen( source,true ) local weaponType = getPedWeapon( thePlayer ) local totalAmmo = getPedTotalAmmo( thePlayer ) if weaponType == 3 and totalAmmo > 0 then setElementFrozen( source, false ) end end end )
  14. addEventHandler( "onClientElementColShapeHit", CHT2, function( element ) if getElementType( element ) == "vehicle" then local thePlayer = getVehicleOccupant( element, 0 ) if not thePlayer then return end setElementFrozen( element,true ) local weaponType = getPedWeapon( thePlayer ) local totalAmmo = getPedTotalAmmo( thePlayer ) if weaponType == 3 and totalAmmo > 0 then setElementFrozen( element, false ) end end end )
  15. --- حرر حسب رغبة صاحب الموضوع edit : أنا و فهد في نفس الوقت خخخخ + setVehiclePlateText لازم نسخة اللعبة تكون 1.3.3 عشان تشتغل الوظيفة
  16. PaiN^

    Question

    @ 6ArHxiMr'3a[Z]eF : Your check is useless, since the "onVehicleExplode" event well be triggered when a vehicle blow .
  17. يقصد زي حق مستر طلال, بس اعتقد مسح المود هو لأني ما حصلته
  18. يعطيك العافية عالشرح الجميل يا جميل
  19. addEventHandler( "onPlayerWasted", getRootElement( ), function ( ) setTimer ( spawnPlayer, 3000, 1, source, 2034, -1414, 16.3 ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local skin = getElementModel( source ) setAccountData( playeraccount, "skin", skin ) end end ) addEventHandler("onPlayerSpawn",getRootElement( ), function( ) local playeraccount = getPlayerAccount( source ) if playeraccount and not isGuestAccount( playeraccount ) then local skin = getAccountData( playeraccount, "skin" ) if skin then setElementModel( source, skin ) else outputChatBox( "NO SKIN SAVED!", source ) end end end )
  20. -------------------------- -- Welcome To Los Santos -------------------------- -- TO SHOP function ammux( ) -- OUTDOOR ammu = createMarker( 1367.9, -1279.6, 14.2, "arrow", 1.5, 251, 255, 2 ) -- INDOOR ammuxx = createMarker( 285.4, -41.3, 1002.1, "arrow", 1.5, 251, 255, 2 ) setElementInterior( ammuxx, 1 ) end addEventHandler( "onResourceStart", resourceRoot, ammux ) function ammux1( marker) -- TO SHOP if marker == ammu then setElementPosition( source, 286.1, -40.6, 1001.5 ) setElementInterior( source, 1 ) -- TO OUT elseif marker == ammuxx then setElementPosition( source, 1357.9, -1279.6, 14.2 ) setElementInterior( source, 0 ) end end addEventHandler( "onPlayerMarkerHit", root, ammux1 )
×
×
  • Create New...