Jump to content

roaddog

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by roaddog

  1. roaddog

    help-bindKey

    local owner = getElementData( player, 'HS_INFO' )[7]; ----its actually here, the line 134
  2. roaddog

    help-bindKey

    Hello guys, In this case, I want to make bind to open gui but this code doesnt work at all. And debugscript says ERROR: house_system\core\core_server.lua:134: attempt to index a boolean value addEventHandler( 'onColShapeHit', m_Enter, function( player ) if getElementType( player ) == 'player' and not getPedOccupiedVehicle( player ) then exports["topbarchat"]:sendClientMessage("#FFFFFFPress #FF0000'H' #FFFFFFto open house gui!",player, 10, 255, 10, false, 1) if not getElementData( player, 'HP_Opened' ) then if not isGuestAccount( getPlayerAccount( player ) ) then setElementData( player, 'mrk_in', getElementData( source, 'HS_INFO' )[9] ); outputChatBox("really?") bindKey(player, 'h', "down", onPlayerHouseMarkerHit, player, source, true) else exports["topbarchat"]:sendClientMessage( '* You must be logged in to get in this house!', player, 255, 51, 36, true ); end; end; end; end ); addEventHandler( 'onColShapeLeave', m_Enter, function( player ) if getElementType( player ) == 'player' and not getPedOccupiedVehicle( player ) then unbindKey(player, 'h', "down", onPlayerHouseMarkerHit) setElementData( player, 'mrk_in', nil ); end; end ); function onPlayerHouseMarkerHit( player, mrk, cursor ) local acc = getPlayerAccount( player ); if isGuestAccount( acc ) then exports["topbarchat"]:sendClientMessage( '* You must be logged in to get in this house!', player, 255, 51, 36,true ); setElementData( player, 'mrk_in', nil ); setPedFrozen( player, false ); return false; end; local tts = { [1] = true, [2] = false, [3] = false, [4] = true, [5] = false, [6] = false }; if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( 'Admin' ) ) or hasObjectPermissionTo( player, 'function.banPlayer', false ) then tts[6] = true; end; local owner = getElementData( player, 'HS_INFO' )[7]; ----its actually here, the line 134 local accName = getAccountName( acc ); if owner == accName then tts[1] = false; tts[2] = true; tts[3] = true; tts[4] = true; tts[5] = true; end; if owner ~= accName and owner ~= '' then tts[1] = false; end; if owner == '' then if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( 'Admin' ) ) or hasObjectPermissionTo( player, 'function.banPlayer', false ) then tts[4] = true; else tts[4] = false; end; end; tts[7] = getElementData( mrk, 'HS_INFO' )[9]; tts[8] = getElementData( mrk, 'HS_INFO' )[7]; tts[9] = getElementData( mrk, 'HS_INFO' )[6]; triggerClientEvent( player, 'openHouseManagementWnd', root, tts, cursor ); end; Thank you.
  3. Oh right. This is what im searching for. Thank you for helping
  4. Yeah, I have it server side on meta, but the prblem is still there
  5. Thanks for replying but it doesnt work Edit : I tried using tow truck, and it didnt work. but if i push the car, it worked Why?
  6. Well heyo guys. I got a lil problem with this script, what am going to do is when the vehicle enters a the colshape, it will be destroyed and if the vehicle has a driver it won't be destroyed, but it doesnt work. Ima asking what should i do for this local myshape = createColCircle(1049.6279296875, -1029.674804687, 4) function ColHit(hitElement) thePlayer = getVehicleController ( hitElement) if (getElementType(hitElement) =="vehicle" ) and not (thePlayer) then destroyElement(hitElement) end end addEventHandler( "onColShapeHit", myshape, ColHit ) Thank you, and i hope it gonna be fixed as soon as possible though
  7. roaddog

    save weapons

    Ohh, I see. Im changing skin using admin panel, so it might use that event, Thankyou, I can fix it.
  8. roaddog

    save weapons

    hello community I have a problem on this weapon saver, the problem is when the skin changed, all weapons gone. I really need help, since i had no idea how it came, sometime its saved, sometime its not function convertWeaponsToJSON(player) local weaponSlots = 12 local weaponsTable = {} for slot=1, weaponSlots do local weapon = getPedWeapon( source, slot ) local ammo = getPedTotalAmmo( source, slot ) if (weapon > 0 and ammo > 0) then weaponsTable[weapon] = ammo end end return toJSON(weaponsTable) end addEventHandler("onPlayerWasted", root, function() local weapons = convertWeaponsToJSON(source) setElementData(source,"tempWeapons",weapons) takeAllWeapons ( source ) end ) function giveWeaponsFromJSON(player, weapons) if (weapons and weapons ~= "") then for weapon, ammo in pairs(fromJSON(weapons)) do if (weapon and ammo) then giveWeapon(player, tonumber(weapon), tonumber(ammo)) end end end end addEventHandler("onPlayerSpawn", root, function () local weapons = getElementData(source,"tempWeapons") if (weapons) then giveWeaponsFromJSON(source, weapons) removeElementData ( source, "tempWeapons" ) end end )
  9. sorry for double posts, I have a problem with loosing weapons when a player change the skin, so it doesn't save the weapons at all
  10. Ohhh Thanks for that, that was fast. It works
  11. Hello community I have a problem with this spawn system, the skin isnt saved addEventHandler( "onPlayerWasted", getRootElement( ), function() local x,y,z = getElementPosition(source) local skin = getElementModel(source) if x >= 0 then if y > 590 then setTimer( spawnPlayer, 1000, 1, source, 1606.81115,1821.92810,10.82031, skin, team) elseif y > -400 then setTimer(spawnPlayer, 1000, 1, source, 1243.521,330.7334,19.55469, skin , team) elseif x >= 1606 then setTimer( spawnPlayer, 1000, 1, source, 2029.95532,-1406.37072,17.21023, skin , team) else setTimer( spawnPlayer, 1000, 1, source, 1172.71948,-1323.23217,15.40160, skin , team) end elseif y < 0 then setTimer( spawnPlayer, 1000, 1, source, -2203.40673,-2310.25146,31.375, skin , team) elseif x < -2000 then setTimer( spawnPlayer, 1000, 1, source, -2656.09277,637.234,14.453, skin , team) elseif x < -700 then setTimer( spawnPlayer, 1000, 1, source, -1514.69409,2520.21459,55.94024 , skin , team) else setTimer( spawnPlayer, 1000, 1, source, -319.34173,1050.21472,20.34025 , skin , team) end end ) Thats all, thank you
  12. Hello, there I have a problem on installing mta, it cant be installed due to error CL38 can anyone help me? Thanks
  13. roaddog

    scoreboard

    Oh, It's working now thanks for the help
  14. roaddog

    scoreboard

    Still doesnt work, and I tried using runcode like this setElementData(getPlayerFromName('Limbaws'), "Gang", exports["groupsystem"]:getPlayerGroup(getPlayerFromName('Limbaws'))) works, but the script doesnt
  15. roaddog

    scoreboard

    Hello, I have a problem with this, it doesnt show the gang in scoreboard, no errors, but I have tried all my best but I couldnt solve it so,, exports [ "scoreboard" ]:addScoreboardColumn ( "Gang",getRootElement() ,40,80, "Gang" ) function getgang() local group = exports.groupsystem: getPlayerGroup(source) if group then setElementData(source, "Gang", getPlayerGroup(source)) else group = "None" end end
  16. Hello guys, I'm here just to ask 1 question Is there any way to create custom poll, like write something and make own options each votes? I know there's a resouce called votemanager, and I want to make a custom poll using it can anyone tell me what should I do? , I mean what steps I gonna follow? That's it, Thank you for reading...have a nice day. greetz, Limbaws
  17. roaddog

    Need help

    Well Thank you guys that helped me alot
  18. roaddog

    Need help

    Hello community Im here to ask a help regarding playerblips. Okay here, I tell you what's the point. I want to make blips that will change after player changes team, ex from criminal to civillian but this code doesnt work at all, I have to restart it then the color will change local blip = { } addEventHandler ( "onPlayerSpawn", root, function ( ) if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local theTeam = getPlayerTeam ( source ) if ( not theTeam ) then return end if ( getTeamName ( theTeam ) == "Police" ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) addEventHandler ( "onResourceStart", resourceRoot, function () for k, v in ipairs ( getElementsByType("player") ) do if ( not isElement ( blip [ v ] ) ) then blip [ v ] = createBlipAttachedTo ( v ) end local theTeam = getPlayerTeam ( v ) if (not theTeam) then return end if ( getTeamName ( theTeam ) == "Police" ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( v, r, g, b ) setBlipColor ( blip [ v ], r, g, b, 255 ) end end ) local blip = { } addEvent ( "onPlayerTeamChanged", true ) addEventHandler ( "onPlayerTeamChanged", root, function ( theTeam ) if ( not theTeam ) then return end if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local theTeam = getTeamName(source) local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) function destroyPlayerBlip( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end addEventHandler ( "onPlayerQuit", root, destroyPlayerBlip ) addEventHandler ( "onPlayerWasted", root, destroyPlayerBlip ) and there is no errors but It got warning here guys Thank you
  19. Hello community Im here to ask a help regarding playerblips. Okay here, I tell you what's the point. I want to make blips that will change after player changes team, ex from criminal to civillian but this code doesnt work at all, I have to restart it then the color will change local blip = { } addEventHandler ( "onPlayerSpawn", root, function ( ) if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local theTeam = getPlayerTeam ( source ) if ( not theTeam ) then return end if ( getTeamName ( theTeam ) == "Police" ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) addEventHandler ( "onResourceStart", resourceRoot, function () for k, v in ipairs ( getElementsByType("player") ) do if ( not isElement ( blip [ v ] ) ) then blip [ v ] = createBlipAttachedTo ( v ) end local theTeam = getPlayerTeam ( v ) if (not theTeam) then return end if ( getTeamName ( theTeam ) == "Police" ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( v, r, g, b ) setBlipColor ( blip [ v ], r, g, b, 255 ) end end ) local blip = { } addEvent ( "onPlayerTeamChanged", true ) addEventHandler ( "onPlayerTeamChanged", root, function ( theTeam ) if ( not theTeam ) then return end if ( not isElement ( blip [ source ] ) ) then blip [ source ] = createBlipAttachedTo ( source ) end local theTeam = getTeamName(source) local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end ) function destroyPlayerBlip( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end addEventHandler ( "onPlayerQuit", root, destroyPlayerBlip ) addEventHandler ( "onPlayerWasted", root, destroyPlayerBlip ) setTimer ( function ( ) for i,v in ipairs ( getElementsByType ( "player" ) ) do if isElement ( blip [ sourc ] ) then destroyElement ( blip [ v ] ) end local theTeam = getPlayerTeam ( v ) if (not theTeam) then return end if ( getTeamName ( theTeam ) == "Police" ) then return end local r, g, b = getTeamColor ( theTeam ) setPlayerNametagColor ( source, r, g, b ) setBlipColor ( blip [ source ], r, g, b, 255 ) end end, 6000, 0 ) and there is no errors but It got warning here guys Thank you
  20. roaddog

    [Fixed][Ty]

    okay lemme explain what's wrong, well i was alone at that time and I did /afk then I did /afklist and it worked fine, but I tried with two players afk and we type /afklist , it was only shown my name, and the others not shown
  21. roaddog

    [Fixed][Ty]

    Any help please?
  22. roaddog

    [Fixed][Ty]

    Actually there is no errors on debugscript
  23. roaddog

    [Fixed][Ty]

    here the afk function ----------fixed----------
×
×
  • Create New...