Whats wrong with this code
#1

if you types /time i want it to say example:

The current server time is 21:02:15
65 seconds (1 minutes) <--- I only want it to say that if your in prison


Код:
command(time, playerid, params[])
{
	#pragma unused params
	
	if( Player[playerid][Cuffed] >= 1 || Player[playerid][Tazed] >= 1 || Player[playerid][IsAtEvent] >= 1 )
	{
	    SendClientMessage( playerid, WHITE, "You're unable to execute this right now." );
	}
	else
	{
		new string[ 128 ], hour, minute, second;
		gettime( hour, minute, second );

		format( string, sizeof( string ), "The current server time is %d:%d:%d ", hour, minute, second );
		SendClientMessage( playerid, WHITE, string );

		    	if( Player[i][PrisonDuration] >= 1)
		    	{
		    	    new string[ 128 ];
		        	Player[i][PrisonDuration]--;
					format( string, sizeof( string ), "~n~~n~~n~~n~~n~~n~~n~ ~R~%d seconds (%d minutes)", Player[i][PrisonDuration], SecondsToMinutes( Player[i][PrisonDuration]) );
	   				SendClientMessage( playerid, GREY, string );
		    	}
Reply


Messages In This Thread
Whats wrong with this code - by FrankC - 21.09.2010, 11:02
Re: Whats wrong with this code - by Mauzen - 21.09.2010, 11:15
Re: Whats wrong with this code - by FrankC - 21.09.2010, 11:29
Re: Whats wrong with this code - by Mauzen - 21.09.2010, 11:40
Re: Whats wrong with this code - by FrankC - 21.09.2010, 12:02

Forum Jump:


Users browsing this thread: 1 Guest(s)