Helloo Guys.
I've made a script to creat a rhino for vip players only but it's not working dont know why ,and when i spawn the vehicle i can't enter the vehicle,here are my codes :
Client :
function scriptCreateTank ( commandName )
local luckyBugger = getLocalPlayer()
local x, y, z = getElementPosition ( luckyBugger )
createVehicle ( 432, x + 7, y, z + 2 )
end
addCommandHandler ( "tank", scriptCreateTank )
addEvent("creatTank", true )
addEventHandler("creatTank", getRootElement(), scriptCreateTank )
Server :
function creatVehicleCommand ( playerSource, commandName )
local acc = getPlayerAccount (playerSource)
if acc and not isGuestAccount(acc) then
local accName = getAccountName (acc )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then
local theTriggerer = getPlayerName ( playerSource )
if commandName == "tank" then
triggerClientEvent (root, "creatTank")
end
end
end
end
addCommandHandler ( "tank", creatVehicleCommand )