/settime command
#10

Quote:
Originally Posted by ★ ♫ • Littlejohny • ♫ ★
I know but its all the same

- LJ
No dude one is using strtok and one isn't, this is not the same is it:

pawn Код:
dcmd_settime(playerid,params[])
{
  if ( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, COLOR_RED, "ERROR: You must be a Admin to use this Command !" );
  if ( !params[ 0 ] ) return SendClientMessage( playerid, COLOR_RED, "ERROR: /settime [hour]" );
  if ( !IsNumeric( params ) ) return SendClientMessage( playerid, COLOR_RED, "ERROR: The 'hour' parameter must be numerical" );  

  new
    string[ 70 ],
    h = strval( params );

  if ( h < 0 || h > 24 ) return SendClientMessage( playerid, COLOR_RED, "ERROR: Use a number from 0 to 24" );
  SetWorldTime( h );
  format( string, sizeof( string ), "Admin %s has change the Time to %d !", GetName(playerid), h );
  SendClientMessageToAll( COLOR_HERE?????, string );
  return 1;
}
As you can see dude there's not a hint of strtok in there and it will function exactly the same but with better speed and efficiency.
Reply


Messages In This Thread
/settime command - by [MLT]Marco - 20.02.2009, 12:46
Re: /settime command - by MenaceX^ - 20.02.2009, 13:30
Re: /settime command - by [MLT]Marco - 20.02.2009, 14:09
Re: /settime command - by Littl3j0hNy - 20.02.2009, 14:15
Re: /settime command - by Donny_k - 20.02.2009, 14:52
Re: /settime command - by Littl3j0hNy - 20.02.2009, 14:54
Re: /settime command - by Donny_k - 20.02.2009, 15:09
Re: /settime command - by [MLT]Marco - 20.02.2009, 15:16
Re: /settime command - by Littl3j0hNy - 20.02.2009, 15:17
Re: /settime command - by Donny_k - 20.02.2009, 15:33
Re: /settime command - by Littl3j0hNy - 20.02.2009, 15:42
Re: /settime command - by Donny_k - 20.02.2009, 16:10
Re: /settime command - by [MLT]Marco - 20.02.2009, 16:18
Re: /settime command - by Daren_Jacobson - 20.02.2009, 16:23
Re: /settime command - by Littl3j0hNy - 20.02.2009, 16:55
Re: /settime command - by [MLT]Marco - 20.02.2009, 17:06
Re: /settime command - by Daren_Jacobson - 20.02.2009, 17:52
Re: /settime command - by Donny_k - 20.02.2009, 17:53
Re: /settime command - by Jason_Borne420 - 03.07.2009, 03:27
Re: /settime command - by Blacklite - 03.07.2009, 04:20
Re: /settime command - by Andom - 03.07.2009, 07:24
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:07
Re: /settime command - by refshal - 03.07.2009, 08:16
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:40
Re: /settime command - by refshal - 03.07.2009, 08:42
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:45
Re: /settime command - by refshal - 03.07.2009, 08:47
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:49
Re: /settime command - by refshal - 03.07.2009, 08:50
Re: /settime command - by [SFD]Marco - 03.07.2009, 08:51
Re: /settime command - by @TheShadow@ - 03.07.2009, 08:55
Re: /settime command - by refshal - 03.07.2009, 09:11
Re: /settime command - by Jason_Borne420 - 19.10.2009, 02:45
Re: /settime command - by homijs - 12.09.2010, 20:07
Respuesta: /settime command - by Alex_Obando - 03.04.2011, 19:17

Forum Jump:


Users browsing this thread: 2 Guest(s)