Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. PaiN^

    Amount of ammo

    In your Lua file ( resource ) !
  2. PaiN^

    Help ?

    Use : toggleControl - setPedControlState ( forwards ) - getElementPosition - getElementRotation - setElementPosition - setElementRotation
  3. I had an error at line 3, Re-read the code thePlayer is the account . Corrected code : function openClass( _,acc ) if not isGuestAccount( acc ) then local class = getAccountData( acc, "theClass" ) if class then setElementData( source, "theClass", class ) end end end addEventHandler( "onPlayerLogin", getRootElement( ), openClass ) function saveClass( ) local acc = getPlayerAccount( source ) if not isGuestAccount( acc ) then local theClass = getElementData( source, "Class" ) setAccountData( acc, "theClass", theClass ) end end addEventHandler( "onPlayerQuit", getRootElement( ), saveClass )
  4. PaiN^

    Help ?

    Use onPlayerDamage to get the attacker, but i didn't understand what you want to happen after !
  5. Client : warptaple = { { "البداية " }, { "الشارع الطويل" }, { "المقر" }, } for i,v in ipairs( warptaple ) do local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) end addEventHandler( "onClientGUIClick", root, function( ) if source == GUIEditor.button[1] then local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if row and col and row ~= -1 and col ~= -1 then local get = guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) if get == "البداية " then triggerServerEvent( "a", localPlayer ) elseif get == "الشارع الطويل" then triggerServerEvent( "b", localPlayer ) elseif get == "المقر" then triggerServerEvent( "c", localPlayer ) end end end end ) Server : addEvent( "a", true ) addEventHandler( "a", root, function( ) spawnPlayer( source, -1518.7962646484, -2355.3571777344, 14.712463378906 ) end ) addEvent( "b", true ) addEventHandler( "b", root, function( ) spawnPlayer( source, -3798.7612304688, -3002.7980957031, 50.607810974121 ) end ) addEvent( "c", true ) addEventHandler( "c", root, function( ) spawnPlayer( source, 1529.0759277344, 2830.3481445313, 17.315364837646 ) end )
  6. function openClass( _,acc ) if not isGuestAccount( acc ) then local class = getAccountData(thePlayer, "theClass") if class then setElementData( source, "theClass", class ) end end end addEventHandler( "onPlayerLogin", getRootElement( ), openClass ) function saveClass( ) local thePlayer = getPlayerAccount( source ) if not isGuestAccount( thePlayer ) then local theClass = getElementData( source, "Class" ) setAccountData( thePlayer, "theClass", theClass ) end end addEventHandler( "onPlayerQuit", getRootElement( ), saveClass )
  7. PaiN^

    SuperMan Script

    @Adde : He said for staff team ! @Shwul : Use these functions : getPlayerTeam - getTeamName - getTeamFromName
  8. local col = createColCuboid ( -676.31543, -2143.39429, 20.17123, 200, 200, 200 ) local zone = createRadarArea ( -676.31543, -2143.39429, 200, 200, 0, 255, 0, 60 ) setElementData ( zone, "zombieProof", true ) function eventsArea ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Everyone" ) ) then toggleControl ( hitElement, "fire", false ) toggleControl ( hitElement, "aim_weapon", false ) toggleControl ( hitElement, "vehicle_fire", false ) outputChatBox ( "Você entrou na área de Eventos", hitElement, 0, 255, 0 ) end end end addEventHandler ( "onColShapeHit", col, eventsArea ) function quited( hitElement ) if ( getElementType ( hitElement ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( hitElement ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Everyone" ) ) then toggleControl ( hitElement, "fire", true ) toggleControl ( hitElement, "aim_weapon", true ) toggleControl ( hitElement, "vehicle_fire", true ) outputChatBox ( "Você entrou na área de Eventos", hitElement, 0, 255, 0 ) -- modify this ! end end addEventHandler ( "onColShapeLeave", col, quited )
  9. PaiN^

    freeroam problem

    Your error is in the fr_client.lua file ( if you modify it ), It appers to be in the gui.lua file because the function that contains the error was created in the gui.lua file .
  10. Don't put any thing and it will automatically be root .
  11. أنا متى قلت شي ؟؟
  12. هو قصده مود الوقت اللي في السيرفر التواجد يعني
  13. -- functions : guiCreateEdit guiCreateLabel guiGetText getPlayerFromName getElementData -- PlayTime guiSetText -- Events : "onClientGUIChanged"
  14. Some of the dff models ( the ones he's replacing ) are set to the same ID, That isn't allowed !
  15. executeSQLQuery( "CREATE TABLE IF NOT EXISTS TableName ( 1, 2, 3 )" ) شايف الأرقام هذي هي الأشياء اللي تخزن فيها, يعني لو تبي تحفظ فلوس لاعب بالسيريال حقه تسوي عمودين executeSQLQuery( "CREATE TABLE IF NOT EXISTS TableName ( serial, money )" ) وكذا على حسب اللي تبي تحفظه + كودك صح اذا المتغيرات معرفة
  16. هذا مجرد مثال على انك تحفظ لون ولاعب وصوت وكذا يعني مجرد مثال + إذا فهمت الجداول راح تلقاها تمشي معاك زي الحلاوة ذذ SQL
  17. Now "sound" at lines 13, 15 and 16 ar nils
  18. Weapons are not elements they are objects ( as far as i know ) . + Maybe you can use setPedControlState with "fire" as the control name
  19. PaiN^

    Fix Code

    The script should work just fine, Make sure that there are players in the "Police" team .
  20. viewtopic.php?f=91&t=52365&p=510856
×
×
  • Create New...