Skip to content

Commit

Permalink
new feature get unixtime in gsc (#15)
Browse files Browse the repository at this point in the history
intended usage for temporary banning
  • Loading branch information
raphael12333 authored Apr 18, 2023
1 parent def79db commit 855df4f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ extern x##_t x
#define GScr_getconfigstring xtn_GScr_getconfigstring
#define GScr_configstringindex xtn_GScr_configstringindex
#define GScr_system xtn_GScr_system
#define GScr_getUnixTime xtn_GScr_getUnixTime
#define SV_Trace xtn_SV_Trace
#define sv_maxRate xtn_sv_maxRate
#define GScr_getSite xtn_GScr_getSite
Expand Down
5 changes: 5 additions & 0 deletions src/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ void GScr_system(int a) {
#endif
}

void GScr_getUnixTime() {
Scr_AddInt(time(NULL));
}

void Scr_GetArrayKeys(int a);
void Scr_PassArray(int);

Expand Down Expand Up @@ -278,6 +282,7 @@ SCRIPTFUNCTION scriptFunctions[] = {
{"getconfigstring", GScr_getconfigstring, 0},
{"configstringindex", GScr_configstringindex, 0},
{"system", GScr_system, 0},
{"getunixtime", GScr_getUnixTime, 0},
{NULL, NULL, 0}
};

Expand Down
1 change: 1 addition & 0 deletions src/script.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ void GScr_salt_password(int a1);
void GScr_getconfigstring(int);
void GScr_configstringindex(int);
void GScr_system(int);
void GScr_getUnixTime();
void GScr_strpos(int);

void GScr_SpawnAnimEnt(int);
Expand Down
1 change: 1 addition & 0 deletions src/symbs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
#define GScr_getconfigstring xtn_GScr_getconfigstring
#define GScr_configstringindex xtn_GScr_configstringindex
#define GScr_system xtn_GScr_system
#define GScr_getUnixTime xtn_GScr_getUnixTime
#define SV_Trace xtn_SV_Trace
#define sv_maxRate xtn_sv_maxRate
#define GScr_getSite xtn_GScr_getSite
Expand Down

0 comments on commit 855df4f

Please sign in to comment.