SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Thread Tools Display Modes
Old 16/02/2020, 04:11 PM   #31
Symon's Avatar
Join Date: Apr 2019
Location: Italy
Posts: 836
Reputation: 68
Default Re: Damage System

Originally Posted by redtin06 View Post
how to change 67 seconds ago to date? instead of ago i wabt to use Feb 14, 2020 06:25
pawn Code:
stock ReturnDate()
    new sendString[90], MonthStr[40];

    gettime(hour, minute, second);
    getdate(year, month, day);

        case 1:  MonthStr = "January";
        case 2:  MonthStr = "February";
        case 3:  MonthStr = "March";
        case 4:  MonthStr = "April";
        case 5:  MonthStr = "May";
        case 6:  MonthStr = "June";
        case 7:  MonthStr = "July";
        case 8:  MonthStr = "August";
        case 9:  MonthStr = "September";
        case 10: MonthStr = "October";
        case 11: MonthStr = "November";
        case 12: MonthStr = "December";

    format(sendString, sizeof(sendString), "%s %d %d - %02d:%02d:%02d", MonthStr, day, year, hour, minute, second);
    return sendString;

Search the line where the script saves the time (i think using gettime), and replace it with ReturnDate();

Note ReturnDate is returning a string, you have to use strcpy to store it.

EDIT: Made it for you in 2 minutes. (not tested)

"A server owner shouldn't be embarrassed or have fear to request help, because we're humans and we never stop learning."
Symon is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Damage system MerryDeer Scripting Help 1 16/09/2016 06:38 AM
Damage/Hit System - Sistema de Damage/Hit Franco33 Scripting Help 0 20/08/2016 04:53 AM
Damage system Alex_T Scripting Help 3 05/01/2015 02:32 PM
Damage System Help Gaurav_Rawat Scripting Help 1 02/08/2013 05:24 PM
[Include] Car damage system - Damage a car without a driver! The_Moddler Includes 68 30/03/2012 01:38 AM

All times are GMT. The time now is 08:45 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.