Jump to content

Ayuda con mi script


Flipi

Recommended Posts

No logro adecuarlo para solo admins :/

local shootTimer = nil 
function shoot() 
    local accountName = getAccountName ( getPlayerAccount ( player ) ) 
    if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "admin" ) ) ) then 
    local vehicle = getPedOccupiedVehicle(player) 
    if not isElement(vehicle) then return end 
    if(not isTimer(shootTimer))then 
        local posX, posY, posZ = getElementPosition(vehicle) 
        shootTimer = setTimer(function()end, 3333, 1) 
        createProjectile(vehicle, 19, posX, posY, posZ, 1.0) 
    end 
end 
bindKey("vehicle_fire", "down", shoot) 
bindKey("vehicle_secondary_fire", "down", shoot) 

Link to comment

No, seria algo asi mas o menos.

client:

local shootTimer = nil 
function shoot(localPlayer) 
  
    local vehicle = getPedOccupiedVehicle(localPlayer) 
    if not isElement(vehicle) then return end 
    if(not isTimer(shootTimer))then 
    triggerServerEvent("chigualockowom", localPlayer) 
        local posX, posY, posZ = getElementPosition(vehicle) 
        shootTimer = setTimer(function()end, 3333, 1) 
        createProjectile(vehicle, 19, posX, posY, posZ, 1.0) 
    end 
end 
bindKey("vehicle_fire", "down", shoot) 
bindKey("vehicle_secondary_fire", "down", shoot) 

server:

addEvent("chigualockowom", true) 
function lala(player) 
 local accountName = getAccountName ( getPlayerAccount ( player ) ) 
    if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then 
    end 
end 
addEventHandler("chigualockowom", root, lala) 

PD: No testeado

Link to comment
No, seria algo asi mas o menos.

client:

local shootTimer = nil 
function shoot(localPlayer) 
  
    local vehicle = getPedOccupiedVehicle(localPlayer) 
    if not isElement(vehicle) then return end 
    if(not isTimer(shootTimer))then 
    triggerServerEvent("chigualockowom", localPlayer) 
        local posX, posY, posZ = getElementPosition(vehicle) 
        shootTimer = setTimer(function()end, 3333, 1) 
        createProjectile(vehicle, 19, posX, posY, posZ, 1.0) 
    end 
end 
bindKey("vehicle_fire", "down", shoot) 
bindKey("vehicle_secondary_fire", "down", shoot) 

server:

addEvent("chigualockowom", true) 
function lala(player) 
 local accountName = getAccountName ( getPlayerAccount ( player ) ) 
    if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then 
    end 
end 
addEventHandler("chigualockowom", root, lala) 

PD: No testeado

¿Dónde está el evento "chigualockowom"?

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...