Jump to content

yToPzz

Members
  • Posts

    39
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

yToPzz's Achievements

Rat

Rat (9/54)

2

Reputation

  1. addEvent ( "aResource", true ) addEventHandler ( "aResource", root, function ( name, action ) if checkClient( "command."..action, source, 'aResource', action ) then return end local pname = getPlayerName ( source ) if ( hasObjectPermissionTo ( client or source, "command."..action ) ) then local text = "" if ( action == "start" ) then if ( startResource ( getResourceFromName ( name ), true ) ) then text = "started" end elseif ( action == "restart" ) then if ( getResourceState ( getResourceFromName ( name ) ) == "running" ) then if ( restartResource ( getResourceFromName ( name ) ) ) then text = "restarted" end end elseif ( action == "stop" ) then if ( stopResource ( getResourceFromName ( name ) ) ) then text = "stopped" end elseif ( action == "delete" ) then if ( deleteResource ( getResourceFromName ( name ) ) ) then text = "deleted" end elseif ( action == "stopall" ) then if ( stopAllResources ( ) ) then text = "All Stopped" end end isso tudo está acima da linha que enviei anteriormente
  2. ERROR: admin\server\admin_server.lua:1282: attempt to concatenate local 'name' (a nil value) if ( text ~= "" ) then outputServerLog ( "ADMIN: Resource \'" .. name .. "\' " .. text .. " by " .. getAdminNameForLog ( source ) ) ---- Line Error for id, player in ipairs(getElementsByType("player")) do triggerClientEvent ( player, "aClientLog", root, text ) end
  3. yToPzz

    Car

    Is there any way for example a 2-door vehicle with a 4-door DFF to support 4 players?
  4. yToPzz

    setTimer

    I want to put some time to run destroyElement but I'm not getting it, could someone help me? addEventHandler("onVehicleExplode", root, function() destroyElement(source) end)
  5. yToPzz

    WARNING

    [2022-10-23 16:48:42] WARNING: Painel-Som\client\gui.lua:255: Bad argument @ 'getVehicleName' [Expected vehicle at argument 1, got boolean] addEvent ("tune.sync_objects", true); addEventHandler ("tune.sync_objects", root, function (veh, objects) local g = tune.gridlist[3]; local label_text = isPedInVehicle (localPlayer) and getVehicleName(getPedOccupiedVehicle(localPlayer)) or "none" ---- line error tune.label[5]:setText("Você deve estar em um veículo para usar este painel.\nVeículo atual: ".. label_text); guiGridListClear (g); if not isPedInVehicle (localPlayer) then return; end if not veh or not objects then return; end for i=#objects, 1, -1 do local v = objects[i]; if isElement (v) then local row = guiGridListAddRow (g); guiGridListSetItemText (g, row, 1, veh, false, false); guiGridListSetItemText (g, row, 2, getElementModel (v), false, false); guiGridListSetItemData (g, row, 1, v); end end guiGridListSetSelectedItem (g, 0, 1); end );
  6. yToPzz

    WARNING

    WARNING: admin\server\admin_ip2c.lua:217: Access denied @ 'fetchRemote' function fetchRemoteContent( cor, url ) local dataOut,errnoOut = nil, nil if fetchRemote( url, 2, function(data,errno) dataOut=data errnoOut=errno end ) then ---- line error while( errnoOut == nil ) do cor:sleep(50) end end return dataOut,errnoOut or -1 end
  7. yToPzz

    BindKey

    I got it, thank you
  8. yToPzz

    BindKey

    Do I have to configure the positions of the functions? eg level, closing option etc?
  9. yToPzz

    BindKey

    did not work : /
  10. yToPzz

    BindKey

    thanks, but there is a problem if you open the panel without being in a vehicle the panel does not close is there a way to make the panel open only when in a car?
  11. yToPzz

    BindKey

    I want to change the function to bindkey how do I? VEHICLE_SETTINGS = false addCommandHandler("steer", function() if VEHICLE_SETTINGS == false then openVehicleSettings() VEHICLE_SETTINGS = true else closeVehicleSettings() VEHICLE_SETTINGS = false end end)
  12. yToPzz

    vehicle

    How do I make the vehicle disappear after it explodes?
  13. yToPzz

    Headshot

    happens that there are 2 scripts where this Headshot is causing problems the first is the passive mode where you cannot kill or die in it and the green areas where you cannot kill with this headshot shooting in the head even with passive mode active or being in a green area the player dies.
  14. yToPzz

    Headshot

    this headshot script is bugging other protections such as passive and green areas could anyone tell if there is a solution? Client-side: function sendHeadshot ( attacker, weapon, bodypart, loss ) if attacker == getLocalPlayer() then if bodypart == 9 then triggerServerEvent( "onServerHeadshot", getRootElement(), source, attacker, weapon, loss ) setElementHealth ( source, 0 ) setPedHeadless( source, true ) end end end addEventHandler ( "onClientPedDamage", getRootElement(), sendHeadshot ) addEventHandler ( "onClientPlayerDamage", getRootElement(), sendHeadshot ) Server-side: function MakePlayerHeadshot( attacker, weapon, bodypart, loss ) if bodypart == 9 then triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) setPedHeadless ( source, true ) killPed( source, attacker, weapon, bodypart ) setTimer( BackUp, 900, 1, source ) end end function MakeHeadshot( source, attacker, weapon, loss ) triggerEvent( "onPlayerHeadshot", source, attacker, weapon, loss ) killPed( source, attacker, weapon, 9 ) setPedHeadless ( source, true ) setTimer( BackUp, 900, 1, source ) end function BackUp( source ) if getElementType ( source ) == "player" then setPedHeadless ( source, false ) end end function outputHeadshotIcon (killer, weapon, bodypart) if bodypart == 9 then cancelEvent() local r2,g2,b2 = getTeamColor ( getPlayerTeam( killer ) ) local r1,g1,b1 = getTeamColor ( getPlayerTeam( source ) ) exports.killmessages:outputMessage ( {getPlayerName(killer),{"padding",width=3},{"icon",id=weapon},{"padding",width=3},{"icon",id=256},{"padding",width=3},{"color",r=r1,g=g1,b=b1},getPlayerName(source) }, getRootElement(),r2,g2,b2) end end addEvent ( "onServerHeadshot", true ) addEventHandler( "onPlayerDamage", getRootElement(), MakePlayerHeadshot ) addEventHandler( "onPlayerKillMessage", getRootElement(), outputHeadshotIcon ) addEventHandler( "onServerHeadshot", getRootElement(), MakeHeadshot )
×
×
  • Create New...