Estevam2d Posted September 5, 2014 Posted September 5, 2014 (edited) I have a vehicle only for VIPs, but when a player who is also writing / vip my vehicle disappears; how can I solve this problem? how do I get the vehicle generate respawn again if I want the same? sorry my bad english Server: function VIPMENUTRIGGER ( thePlayer , commandName ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent ( thePlayer, "GUIVIP", thePlayer) destroyElement (criado) else outputChatBox ( "Voce nao e vip, para comprar fale com alguem da staff",thePlayer) end end addCommandHandler ( "vip", VIPMENUTRIGGER ) function vehiclecar (id) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local x,y,z = getElementPosition ( source ) criado = createVehicle ( id, x + 3, y, z + 1 ) warpPedIntoVehicle(source, criado) setElementModel(source, id) outputChatBox("[VIP] Veiculo criado",source,255,255,0,false) end end addEvent( "carr", true ) addEventHandler( "carr", getRootElement(),vehiclecar ) Edited September 5, 2014 by Guest
Anubhav Posted September 5, 2014 Posted September 5, 2014 vip = {} function VIPMENUTRIGGER ( thePlayer , commandName ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent ( thePlayer, "GUIVIP", thePlayer) if isElement(vip[thePlayer]) then destroyElement (CRIADO) end else outputChatBox ( "Voce nao e vip, para comprar fale com alguem da staff",thePlayer) end end addCommandHandler ( "vip", VIPMENUTRIGGER ) function vehiclecar (id) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local x,y,z = getElementPosition ( source ) vip[source] = createVehicle ( id, x + 3, y, z + 1 ) warpPedIntoVehicle(source, criado) setElementModel(source, id) outputChatBox("[VIP] Veiculo criado",source,255,255,0,false) end end addEvent( "carr", true ) addEventHandler( "carr", getRootElement(),vehiclecar ) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Estevam2d Posted September 5, 2014 Author Posted September 5, 2014 It did not work, some do not and neither he goes straight to the vehicle now.
Castillo Posted September 5, 2014 Posted September 5, 2014 warpPedIntoVehicle(source, criado) Change 'criado' to vip [ source ] San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Estevam2d Posted September 5, 2014 Author Posted September 5, 2014 thanks but pq can spawn several cars? how do i spawn the same one I always wanting ?
Estevam2d Posted September 5, 2014 Author Posted September 5, 2014 Thank you and Anubhav Solidsnake14 If it were not for you guys would be all wrong now, you guys are geniuses. vip = {} function VIPMENUTRIGGER ( thePlayer , commandName ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent ( thePlayer, "GUIVIP", thePlayer) if isElement(vip[thePlayer]) then destroyElement (vip[thePlayer]) end else outputChatBox ( "Voce nao e vip, para comprar fale com alguem da staff",thePlayer) end end addCommandHandler ( "vip", VIPMENUTRIGGER ) function vehiclecar (id) local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then local x,y,z = getElementPosition ( source ) vip[source] = createVehicle ( id, x + 3, y, z + 1 ) warpPedIntoVehicle(source, vip[source]) setElementModel(source, id) outputChatBox("[VIP] Veiculo criado",source,255,255,0,false) end end addEvent( "carr", true ) addEventHandler( "carr", getRootElement(),vehiclecar )
Anubhav Posted September 5, 2014 Posted September 5, 2014 No problem. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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