20.08.2011, 21:11
(
Last edited by Admigo; 20/08/2011 at 09:47 PM.
)
Heey guys,
I made a 20 seconds timer with pvarint.
onplayerpickup
timer
ontopofscript
counter=0;
And if i pickup the pickup i dont need to wait 20 seconds i just get the gangzone.
What i did wrong?
I made a 20 seconds timer with pvarint.
onplayerpickup
Code:
if(pickupid==areap) { if(gTeam[playerid]==TEAM_EUROPE) { for(new i; i < MAX_PLAYERS; i++) { //GangZoneShowForAll(area,GZ_YELLOW); capturezone=SetTimer("capturezones",1000,1); SetPVarInt(i, "europe_area51", 1); } } }
Code:
forward capturezones(); public capturezones() { counter++; for(new i; i < MAX_PLAYERS; i++) { if(counter== 20 && (GetPVarInt(i, "europe_area51") == 1)) { GangZoneShowForAll(area,GZ_YELLOW); counter=0; KillTimer(capturezone); } } }
counter=0;
And if i pickup the pickup i dont need to wait 20 seconds i just get the gangzone.
What i did wrong?