Moderators Lord Henry Posted November 10, 2016 Moderators Posted November 10, 2016 Hello everyone. I programmed a script that create VIP houses and when it does, it creates a green house blip on the map where the house was created. When this house is bought out by someone, the blip is changed to red house blip. But I want to keep an Yellow House blip instead of the green house blip. The blips only appear on the map when I hold the key " i " (example of how it should appear) The script calls the blips with this: bindKey( 'i', 'both', function( key, keyState ) if keyState == 'down' then for k, v in ipairs ( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'HSV_INFO' ) and getElementData( v, 'HSV_INFO' )[7] then if getElementData( v, 'HSV_INFO' )[7] ~= '' then createBlipAttachedTo( v, 32 ); --Red house blip else createBlipAttachedTo( v, 31 ); --Green house blip --createBlipAttachedTo( v, 64 ); --Yellow house blip end; end; end; else for k, v in ipairs( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'HSV_INFO' ) then for k, elem in ipairs( getAttachedElements( v ) ) do if getElementType( elem ) == 'blip' then destroyElement( elem ); end; end; end; end; end; end ); I tried to create a new blip and call him, but the MTA doesn't recognize it and send a white square instead of my new blip. Any idea? Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Moderators Lord Henry Posted November 12, 2016 Author Moderators Posted November 12, 2016 Up... Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Gravestone Posted November 12, 2016 Posted November 12, 2016 In the code above ^ you're checking if the client pressed 'i' key, if so, the blips would show. Else if the state of the key is 'up' or 'released' then it would destroy those blips. Also, by replacing green house blip with yellow house blip, it will only change the blip for you, not for other players. Adding a blip won't work unless you make your own radar. Clan war system http://sh.st/7r4nI
Moderators Lord Henry Posted November 13, 2016 Author Moderators Posted November 13, 2016 On 12/11/2016 at 2:29 PM, Gravestone said: In the code above ^ you're checking if the client pressed 'i' key, if so, the blips would show. Else if the state of the key is 'up' or 'released' then it would destroy those blips. Also, by replacing green house blip with yellow house blip, it will only change the blip for you, not for other players. Adding a blip won't work unless you make your own radar. Oh... Thanks by the information, even if I could change that blip, it will show only to me, but I need to show to all players. I will search a tutorial about creating my own radar. Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Gravestone Posted November 14, 2016 Posted November 14, 2016 17 hours ago, lordhenry said: it will show only to me, but I need to show to all players. Is this code client sided? If so, make it server sided or you can use setElementVisibleTo and loop through all the players setting the blip visible to each. Clan war system http://sh.st/7r4nI
Moderators Lord Henry Posted November 14, 2016 Author Moderators Posted November 14, 2016 1 hour ago, Gravestone said: Is this code client sided? If so, make it server sided or you can use setElementVisibleTo and loop through all the players setting the blip visible to each. Yes... The resource have a client sided script and a server sided script. It calls the blips on the client sided script. Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Gravestone Posted November 15, 2016 Posted November 15, 2016 On 11/14/2016 at 5:49 PM, lordhenry said: Yes... The resource have a client sided script and a server sided script. It calls the blips on the client sided script. That means the blips would be only be visible to the client pressing the 'i' key. Clan war system http://sh.st/7r4nI
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