Some /set commands
#2

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;
}
With this you can start off.
Reply


Messages In This Thread
Some /set commands - by Markx - 23.03.2011, 19:09
Re: Some /set commands - by Zh3r0 - 23.03.2011, 19:12
Re: Some /set commands - by Markx - 23.03.2011, 19:14
Re: Some /set commands - by Markx - 23.03.2011, 19:22
Re: Some /set commands - by Calgon - 23.03.2011, 19:37
Re: Some /set commands - by Zh3r0 - 23.03.2011, 19:37
Re: Some /set commands - by Markx - 23.03.2011, 19:51

Forum Jump:


Users browsing this thread: 1 Guest(s)