Jacobob14 Posted May 3, 2014 Share Posted May 3, 2014 because not stop attacking zombies what is the problem ? 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 ) Link to comment
Snow-Man Posted May 4, 2014 Share Posted May 4, 2014 infectados, z_Table and w_Table not definated Link to comment
Jacobob14 Posted May 4, 2014 Author Share Posted May 4, 2014 infectados, z_Table and w_Table not definated 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 ) 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