weather 18 geting health
#1

Hallo i need script to weather whith geting player HP.

Who help me?
Reply
#2

Quote:
Originally Posted by Auri
Посмотреть сообщение
Hallo i need script to weather whith geting player HP.

Who help me?
can you explean more?
Reply
#3

Weather witch geting health i set weather sandstorm and this weather take player HP - 30

30 SEC = -10 HP
Reply
#4

You have to make a timer:

PHP код:
//@top of the script:
new weather;
//OnGameModeInit
SetTimer(!"@weather",1000*30,1);
//When you set weather:
weather 18//for example
SetWeather(weather);
//Then in the callback
@weather();@weather() {
    switch(
weather) {
        case 
18: {
            const 
Float:dmg 10.0//for example 10 Hp every 30sec
            
for(new i=GetPlayerPoolSize()+1,Float:h; --i!=-1; )
            {
                if(!
IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
                
GetPlayerHealth(i,h),SetPlayerHealth(i,h-dmg);
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)