#include <a_samp>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Testing Filter ");
print("--------------------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buylicense", cmdtext, true, 10) == 0)
{
new File:stats = fopen("/stats.txt", io_write);
if(stats)
{
fwrite(stats, "license = 1");
fclose(stats);
}
return 1;
}
if (strcmp("/check", cmdtext, true, 10) == 0)
{
new string[64];
new File:stats = fopen("stats.txt", io_read);
while(fread(stats, string))
{
if(strcmp(string,"license",true) ==0)
{
SendClientMessage(playerid,0xFF0000FF,"You bought a license.");
}
if(strcmp(string,"license",false) ==0)
{
SendClientMessage(playerid,0xFF0000FF,"You didn't bought a license.");
}
}
fclose(stats);
return 1;
}
return 0;
}
|
You may use Dini , Y_ini and i will suggest you to use Database is faster.
If you just start to make game mode. |
|
This.
Saving players' data by using functions from file.inc is outdated. |
|
You may use Dini , Y_ini and i will suggest you to use Database is faster.
If you just start to make game mode. |
|
This.
Saving players' data by using functions from file.inc is outdated. |
|
Originally Posted by LarzI
Not to mention inefficient
|
) (use of macros etc) there is but any difference in speed or efficiency.