convert /mytime
#1

how can I translate this command strcmp? variables excluded rescue
Код:
CMD:mytime( playerid, params[] )
{
	new Time;
    if ( P_DATA[ playerid ][ P_Logged ] == 0 )
	    return SendError( playerid, "You must be logged in to change your time! ~n~Type ~b~~h~/login.");

	if ( sscanf( params, "i", Time ) )
	    return SendUsage( playerid, "/mytime <hour>");

	if ( Time < 0 || Time > 24 )
	    return SendError( playerid, "~n~Numbers must be from ~b~~h~0 ~w~to ~b~~h~24");

	P_DATA[ playerid ][ P_Time ] = Time;
	SetPlayerTime( playerid, Time, 0 );

	new String[ 160 ];
	format( String, sizeof String, "You have changed your time to ~b~~h~%d~w~:~b~~h~00~w~. It has been saved into your account, on next login this time will be applied.", Time );
	Info( playerid,  String, 5000);

	new iUID = BUD::GetNameUID( PlayerName2( playerid ) );
	BUD::SetIntEntry(iUID, "Time", params[ 0 ] );
	return 1;
}
tanks guy
Reply


Messages In This Thread
convert /mytime - by toi - 28.02.2013, 18:41
Re: convert /mytime - by Bicentric - 28.02.2013, 18:46
Re: convert /mytime - by toi - 28.02.2013, 18:57
Re: convert /mytime - by Bicentric - 28.02.2013, 19:00
Re: convert /mytime - by toi - 28.02.2013, 19:05
Re: convert /mytime - by Bicentric - 28.02.2013, 19:13

Forum Jump:


Users browsing this thread: 2 Guest(s)