PoPaY_MTA Posted January 31, 2019 Share Posted January 31, 2019 I Need Help To Make A Script That Forbids Players From Downloading Give / Car To Pick Up A Vehicle! I Did It, But It Did not Get It! Note: Script is in Portuguese local Veiculos = {400} -- IDs dos Veículos. Tulio = {} function CreateVehicle (source) if getElementData (source, "Pegou", true) then outputChatBox ('#00bfffAguarde #ffffff20 #00bfffsegundos para pegar novamente.',source,255,255,255,true) return end if isElement(Tulio[source]) then destroyElement (Tulio[source]) Tulio[source] = nil end local accName = getAccountName ( getPlayerAccount (Tulio) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "JOGADOR" ) ) then local x,y,z = getElementPosition (source) local Cars = Veiculos[math.random(#Veiculos)] Tulio[source] = createVehicle (Cars,x,y,z) warpPedIntoVehicle (source,Tulio[source]) outputChatBox ('#888888[#FF8800SERVIDOR#888888]'..getPlayerName(source)..' #FFFFFFPegou um veiculo digitando #FF8800/veh', root, 255, 255, 255, true) setElementData (source, "Pegou",true) setTimer (setElementData, 20000, 1, source, "Pegou", false) end addCommandHandler ("veh", CreateVehicle) function DestroyVeiculo () destroyElement (Tulio[source]) end addEventHandler ("onPlayerLogout", root, DestroyVeiculo) addEventHandler ("onPlayerQuit", root, DestroyVeiculo) addEventHandler ("onPlayerWasted", root, DestroyVeiculo) Link to comment
0 SrPattif Posted March 23, 2019 Share Posted March 23, 2019 (edited) Hello my friend! I think I've found your problem! Notice that where it's marked in print, do we have different arguments? Maybe this is it. , Try this code: local Veiculos = {400} -- IDs dos Veículos. Tulio = {} function CreateVehicle (source) if getElementData (source, "Pegou", true) then outputChatBox ('#00bfffAguarde #ffffff20 #00bfffsegundos para pegar novamente.',source,255,255,255,true) return end if isElement(Tulio[source]) then destroyElement (Tulio[source]) Tulio[source] = nil end local accName = getAccountName ( getPlayerAccount (Tulio) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "JOGADOR" ) ) then local x,y,z = getElementPosition (source) local Cars = Veiculos[math.random(#Veiculos)] Tulio[source] = createVehicle (Veiculos,x,y,z) warpPedIntoVehicle (source,Tulio[source]) outputChatBox ('#888888[#FF8800SERVIDOR#888888]'..getPlayerName(source)..' #FFFFFFPegou um veiculo digitando #FF8800/veh', root, 255, 255, 255, true) setElementData (source, "Pegou",true) setTimer (setElementData, 20000, 1, source, "Pegou", false) end addCommandHandler ("veh", CreateVehicle) function DestroyVeiculo () destroyElement (Tulio[source]) end addEventHandler ("onPlayerLogout", root, DestroyVeiculo) addEventHandler ("onPlayerQuit", root, DestroyVeiculo) addEventHandler ("onPlayerWasted", root, DestroyVeiculo) Edited March 23, 2019 by _Pattif_ I don't edited Link to comment
Question
PoPaY_MTA
I Need Help To Make A Script That Forbids Players From Downloading Give / Car To Pick Up A Vehicle!
I Did It, But It Did not Get It! Note: Script is in Portuguese
Link to comment
1 answer to this question
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