Jump to content

HELP Please


Recommended Posts

Guys please help me, I got this script but it's doesn't work, Please help !!

server.lua

function vipReplaceModele (_, acc)

  1.  
  2.     local accName = getAccountName (acc )
  3.      if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then
  4.            triggerClientEvent (source,  "onReplace", root )  
  5.     end
  6. end
  7. addEventHandler('onPlayerLogin', root, vipReplaceModele)

And this  client.lua

  1.  
  2. function replaceModele ()  
  3.     local txd = engineLoadTXD("hydra.txd")
  4.     engineImportTXD(txd, 520)
  5.     local dff = engineLoadDFF("hydra.dff", 520)
  6.     engineReplaceModel(dff, 520)
  7. end
  8. addEvent( "onReplace", true )

addEventHandler( "onReplace", root, replaceModele )

-It's a hydra only for VIP can spawn this vehicles, but when i remove VIP at myself,The hydra was spawn.

-Please help !!!

Link to comment
function vipReplaceModele ()
    local account = getPlayerAccount(source)
     if isObjectInACLGroup ("user."..getAccountName( account ), aclGetGroup ( "VIP" ) ) then
        triggerClientEvent (source,  "onReplace", source )  
    end
end
addEventHandler('onPlayerLogin', root, vipReplaceModele)

function replaceModele ()  
    local txd = engineLoadTXD("hydra.txd")
    engineImportTXD(txd, 520)
    local dff = engineLoadDFF("hydra.dff", 520)
    engineReplaceModel(dff, 520)
end
addEvent( "onReplace", true )
addEventHandler( "onReplace", root, replaceModele )

Try it i did some changes i tried it in my local and it works

Link to comment

It doesn't work,The player non-vip can spawn hydra.

Help!! i want VIP can spawn hydra and non-VIP cannot spawn it with saying in chat for non-vip ( Only for VIP can use this vehicle)

 

But wait,It's need to add hydra.dff or 520.dff??? (On Meta.xml)

 

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...