|
Senior Member
|
07-18-2018
, 04:39
Re: string replace
|
#4
|
Quote:
Originally Posted by Alexunder
thx man , this is my script :
Code:
public Action:thetimeCmd(client, args)
{
decl String:ctime[64];
FormatTime(ctime, 64, NULL_STRING);
PrintToChat(client, "\x01 \x04[SM]\x01 Time : \x04 %s", ctime);
}
Result : [SM] Time : 2018/07/18 11:11
i want to exchange "07" to "09" ok ?
i don't have problem for set time zone , i just want replace (fun) .
can you help me ?
|
PHP Code:
public Action Cmd_Time(int client, int args)
{
if (0 < client <= MaxClients && IsClientInGame(client))
{
char[] sTime = new char[64];
FormatTime(sTime, 64, NULL_STRING);
ReplaceString(sTime, 64, "/07/", "/09/");
PrintToChat(client, " \x04[SM]\x01 Time: \x04%s", sTime);
}
return Plugin_Handled;
}
__________________
|
|
|
|