26.11.2015, 13:24
Certo, mesmo definindo o 'Float' eu tenho que definir a public para fazer perder vida a cada 1 segundo (SetTimer...1000 ms....):
Preciso de algo como isso:
Preciso de algo como isso:
Quote:
forward PerderVida(); public PerderVida() { new Float:tmphealth; for(new i; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; if(!(PLAYER_STATE_ONFOOT <= GetPlayerState(i) <= PLAYER_STATE_PASSENGER)) continue; //Ignores players that are dead, spectating or in class-selection for(new e; e < sizeof(InfecAreas); e++) { if(IsPlayerInPlace(i, RandomSpawns[e][0], RandomSpawns[e][1], RandomSpawns[e][2], RandomSpawns[e][3])) { GetPlayerHealth(i, tmphealth); tmphealth -= 1.0; //Change it to the amount that you want, the player will lose this amount of health while he is in the area SetPlayerHealth(i, tmphealth); break; //Stops the areas loop } } return 1; } |