Jump to content

How to set to only vip players can use it?


DeaDD20

Recommended Posts

server.Lua 

local skins = function(id)
for _, player in ipairs(getElementsByType("player")) do
local uye = getPlayerAccount ( source )
if  getPedOccupiedVehicle(source) and not isGuestAccount ( uye ) then
triggerClientEvent(root,"skinUygula", source, getPedOccupiedVehicle(source),id)
setAccountData ( uye, "hunter.skinID", id )
end
end
end
addEvent("skinUygulaServer", true)
addEventHandler("skinUygulaServer", root, skins)
local skinsAktif = function()
local uye = getPlayerAccount ( source )
if  getPedOccupiedVehicle(source) and not isGuestAccount ( uye ) then
id = getAccountData ( uye, "hunter.skinID" )
triggerClientEvent(root,"skinUygula", source, getPedOccupiedVehicle(source),id)
end
end
addEvent("skinAktifServer", true)
addEventHandler("skinAktifServer", root, skinsAktif)

Link to comment

Like that?

triggerEventHandler ( "skinUygula", root,
function ("skinUygula", root, skins)
 if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "VIP" ) ) and type == 0 then
        cancelEvent ( )
end

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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