Thread: string replace
View Single Post
LenHard
Senior Member
Join Date: Jan 2016
Old 07-18-2018 , 04:39   Re: string replace
Reply With Quote #4

Quote:
Originally Posted by Alexunder View Post
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 clientint args)
{
    if (
client <= MaxClients && IsClientInGame(client))
    {
        
char[] sTime = new char[64];
        
FormatTime(sTime64NULL_STRING);
        
ReplaceString(sTime64"/07/""/09/");
        
PrintToChat(client" \x04[SM]\x01 Time: \x04%s"sTime);
    }
    return 
Plugin_Handled;

__________________
LenHard is offline