PDA

View Full Version : SetPlayerWeather bug


ancezas
18/03/2014, 03:10 PM
hi, i have this code:

SetTimerEx( "Dumai", 7000, false, "i", playerid );



forward Dumai( playerid );
public Dumai( playerid )
{
SetPlayerWeather( playerid, 49 );
SetPlayerDrunkLevel( playerid, 10000 );
SetTimerEx( "NPabaiga", 30000, false, "i", playerid );
return true;
}
And playerWeather changes to normal after 5-10sec, why he is changing into normal? there is no codes for that in entire gm

UnknownOwner
18/03/2014, 03:11 PM
I don't think there is a weather with ID 49....

And show us you "Npabaiga" timer code...

Chrillzen
18/03/2014, 03:13 PM
SetTimerEx( "Dumai", 7000, false, "i", playerid );


forward Dumai( playerid );
public Dumai( playerid )
{
SetPlayerWeather( playerid, 49 );
SetPlayerDrunkLevel( playerid, 10000 );
return 1;
}

Macronix
18/03/2014, 03:15 PM
Check the code for SetTimerEx( "NPabaiga", 30000, false, "i", playerid );

Sascha
18/03/2014, 03:15 PM
there is an ID for 49.. it's just not listed in the standard ID-list, as the IDs > 20 are quite crazy sometimes...
I personally think that there somewhere has to be something that sets it back to normal anywhere else in the script...
Have you also checked for any other "SetWeather"? It's quite weird that this occurs otherwise.. I can only explain it to myself with some other timer that is setting the general weather (or the players weather) at some other point of your script -.-


PS: the other timer has an effect after 30 seconds guys.. that won't explain 5-10seconds at all...

ancezas
18/03/2014, 03:21 PM
forward NPabaiga( playerid );
public NPabaiga( playerid )
{
if( IsPlayerConnected( playerid ) )
{
SetCameraBehindPlayer( playerid );
SetPlayerDrunkLevel( playerid, 0 );//
SetPlayerWeather( playerid, 2 );//
zInfo[ playerid ][ apsineses ] = 0;
}
return false;
}
but athore scripts like SetPlayerDrunkLevel( playerid, 0 );// nots working when weather changes