23.03.2011, 19:12
pawn Код:
CMD:setweather( playerid, params[ ] )
{
new Player, Weather;
if ( sscanf( params, "ui", Player, Weather ) ) return SendClientMessage( playerid, 0x20FF20FF, "USAGE: /setweather "GREY"<id> <weather id>");
else
{
if ( Player == ( 0xFFFF ) ) return SendClientMessage( playerid, 0xFF2020FF, "Player not connected!");
SetPlayerWeather( Player, Weather );
new Str[ 256 ];
if ( Player != playerid )
{
format( Str, sizeof (Str), "You set %s's weather to %d", Name( Player ), Weather );
SendClientMessage( playerid, 0xC3C3C3FF, Str );
format( Str, sizeof (Str), "Admin %s set your weather to %d", Name( playerid), Weather );
SendClientMessage( Player, 0xC3C3C3FF, Str );
}
else
{
format( Str, sizeof (Str), "You set your weather to %d", Weather );
SendClientMessage( playerid, 0xC3C3C3FF, Str );
}
}
return 1;
}