MrDante Posted February 9, 2016 Share Posted February 9, 2016 E ai galera, estou com um problema! (novidade ) enfim, eu queria que se o player atirasse no ped, o ped começa a atirar no player, só que, vem dois problemas, que ele n atira no player, e que todos os peds q começa a atirar, não só os que selecionei, alguem sabe resolver? Client function atirar(attacker) givePedWeapon(source, 31, 5000, true) setPedControlState(source, "aim_weapon", true) setPedControlState(source, "fire", true) end addEventHandler("onClientPedDamage", root, atirar) addEvent("atirar", true) addEventHandler("atirar", root, atirar) Server local ped1 = createPed ( 170, 291.88595581055, -108.11327362061, 1001.515625, 266.90405273438,true ) local ped2 = createPed ( 215, 292.69845581055, -108.1056060791, 1001.515625, 88.905662536621,true ) local vendedor1 = createPed ( 67, 290.14352416992, -111.51473999023, 1001.515625, 354.35003662109,true ) local vendedor2 = createPed ( 28, 291.11795043945, -104.48545837402, 1001.515625, 181.09841918945,true ) -- Os peds (ped1, ped2) They are shooting well, but I have not selected them to shoot function atiranovendedor(source) triggerClientEvent(source, "atirar", vendedor1) triggerClientEvent(source, "atirar", vendedor2) end 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