You should change this
PHP Code:
public OnMapStart() {
beamSprite = PrecacheModel("materials/sprites/laserbeam.vmt");
glowsprite = PrecacheModel("sprites/redglow3.vmt");
CreateTimer(0.1, Timer_Render, _, TIMER_REPEAT);
}
to this
PHP Code:
public OnMapStart() {
beamSprite = PrecacheModel("materials/sprites/laserbeam.vmt");
glowsprite = PrecacheModel("sprites/redglow3.vmt");
CreateTimer(0.1, Timer_Render, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}
in order to prevent creating duplicated timers on each mapchange.
Code:
TIMER_FLAG_NO_MAPCHANGE
The timer will automatically stop if the map changes
Source:
https://wiki.alliedmods.net/SourcePa...rs#Timer_Flags
__________________