Jacobob14 Posted February 27, 2014 Posted February 27, 2014 what is the problem zombies do not stop attack when I become a zombie local infectados = createTeam ( "Infectados", 250, 0, 20) local w_Table = {2,3,5,6,7,8,9} local z_Table = { 65,66,64,63,62,61,60,78,79,80,81 } addEvent( "beaZombie", true ) addEventHandler( "beaZombie", root, function ( ) setPlayerTeam( source, infectados ) takeAllWeapons ( source ) setElementModel( source, z_Table[math.random( 1, #z_Table)]) giveWeapon ( source, w_Table[math.random( 1, #w_Table)] , 1, false ) setElementData( source, "infected", true ) setElementHealth( source, 100 ) setElementData( source, "zombie", true) if isPedInVehicle( source ) then removePedFromVehicle ( source) end end ) addEventHandler( "onVehicleStartEnter", root, function ( thePlayer ) if getPlayerTeam( thePlayer ) == infectados then cancelEvent() end end ) addEventHandler( "onPlayerSpawn", root, function () setElementData( source, "infected", false ) setElementData( source, "zombie", false) end )
xXMADEXx Posted February 27, 2014 Posted February 27, 2014 Does debugscript give you any errors for this script? If so, which ones? The Ultimate Lua Tutorial! | MTA PHP SDK
Jacobob14 Posted February 27, 2014 Author Posted February 27, 2014 does not have errors the only problem is that when I become zombies the zombies who follow me do not stop attacking me
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