//_Dragon Posted December 13, 2015 Share Posted December 13, 2015 is possible to make some vehicles only for staff ? when player wanna take hydra from he can't he will see message in chat [ you can't get this Only staff can ] ?? Link to comment
1LoL1 Posted December 13, 2015 Share Posted December 13, 2015 (edited) This is retard man. Edited December 16, 2015 by Guest Link to comment
//_Dragon Posted December 13, 2015 Author Share Posted December 13, 2015 Yes it's possible. staffcarss = { [520] = true, } function staffcars ( player, seat, jacked ) if staffcarss[getElementModel(source)] then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then else cancelEvent() outputChatBox ("text", player, 255, 255, 255, true ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), staffcars ) server or client ? Link to comment
1LoL1 Posted December 13, 2015 Share Posted December 13, 2015 (edited) This is retard man. Edited December 16, 2015 by Guest Link to comment
//_Dragon Posted December 13, 2015 Author Share Posted December 13, 2015 I make it server but doesnt worke & i made it client but doesnt worke too nothen in debugscript Link to comment
//_Dragon Posted December 13, 2015 Author Share Posted December 13, 2015 ----serverstaffcarss = { [520] = true, } function staffcars ( player, seat, jacked ) if staffcarss[getElementModel(source)] then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then else cancelEvent() outputChatBox ("You can't get hydra", player, 255, 255, 255, true ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), staffcars ) ---meta Link to comment
//_Dragon Posted December 13, 2015 Author Share Posted December 13, 2015 i mean like that i want make mod http://imgur.com/cgz4vTT http://imgur.com/7VyxjfC Thats for VIP acl acc exemple Link to comment
Captain Cody Posted December 15, 2015 Share Posted December 15, 2015 staffcarss = { [520] = true, } function staffcars ( player, seat, jacked ) if staffcarss[getElementModel(source)] then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then cancelEvent() outputChatBox ("Yee must be admin to neter this car matty.", player, 255, 255, 255, true ) else return end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), staffcars ) - Link to comment
//_Dragon Posted December 15, 2015 Author Share Posted December 15, 2015 staffcarss = { [520] = true, } function staffcars ( player, seat, jacked ) if staffcarss[getElementModel(source)] then if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then cancelEvent() outputChatBox ("Yee must be admin to neter this car matty.", player, 255, 255, 255, true ) else return end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), staffcars ) - DuDE worke but i wannt only who's admin the hydra will get down & who's not admin hydra will not get down Link to comment
Captain Cody Posted December 15, 2015 Share Posted December 15, 2015 What do you mean by this... Link to comment
//_Dragon Posted December 15, 2015 Author Share Posted December 15, 2015 What do you mean by this... Like i'm player , i go to f1 , aircraft , hydra ; when i press hydra autom i saw message in chatbox : You can't get this Only Admin & if i'm Admin i go to aircraft press hydra & hydra will get down u understand ? Link to comment
Captain Cody Posted December 15, 2015 Share Posted December 15, 2015 Yes. Seams I cannot help you there. Link to comment
Addlibs Posted December 15, 2015 Share Posted December 15, 2015 If that F1 you're talking about is from the freeroam resource, you'll have to edit that resource. Link to comment
//_Dragon Posted December 15, 2015 Author Share Posted December 15, 2015 (edited) If that F1 you're talking about is from the freeroam resource, you'll have to edit that resource. I need example Edited December 16, 2015 by Guest Link to comment
Captain Cody Posted December 16, 2015 Share Posted December 16, 2015 isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then code- - else end end Link to comment
Dealman Posted December 16, 2015 Share Posted December 16, 2015 Go to resources/[gameplay]/freeroam and open up the file fr_server.lua. Find this line; vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) Try changing it to this; if(vehID == 520) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) else outputChatBox("You're not allowed to spawn this vehicle!", source, 187, 0, 0, true) end else vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) end Link to comment
//_Dragon Posted December 16, 2015 Author Share Posted December 16, 2015 Work perfect dude But i want make some vehicles can player bought them Like hunter == 25000$ i mean when player have 25000$ & he press hunter two cliques he'll get it But for Admin he get it free it's possible ? Link to comment
//_Dragon Posted December 16, 2015 Author Share Posted December 16, 2015 Anyone help ? Link to comment
Dealman Posted December 16, 2015 Share Posted December 16, 2015 Of course it's possible, but try and do it yourself this time. I already showed you where the relevant code is. getPlayerMoney -- Check if the player has $25 000 takePlayerMoney -- If the player can afford it, take away $25 000 of their money Edit: A little hint, you only need to modify this piece of code; else outputChatBox("You're not allowed to spawn this vehicle!", source, 187, 0, 0, true) end Link to comment
//_Dragon Posted December 16, 2015 Author Share Posted December 16, 2015 i need code from wiki about buying vehicle Help me to do it dude really i need this Link to comment
-Doc- Posted December 16, 2015 Share Posted December 16, 2015 If youre a 'pro scripter' why you dont even try to make a code? http://imgur.com/asq6Fxa Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now