10.03.2016, 16:45
(
Последний раз редактировалось martin3644; 12.03.2016 в 17:12.
)
Hello!
I have these testing commands for my server VIP system. These commands will be removed if I put my server online.
The problem with the first command is, that I can't write the timestamp to the users' file. If I type the command, then it says "Unknown command" and nothing else.
The second command is just for testing the variable. /freevip puts my variables right, but doesn't write the files.
Is there something wrong...or doesn't it work that way?
Thank You!
I have these testing commands for my server VIP system. These commands will be removed if I put my server online.
The problem with the first command is, that I can't write the timestamp to the users' file. If I type the command, then it says "Unknown command" and nothing else.
The second command is just for testing the variable. /freevip puts my variables right, but doesn't write the files.
Is there something wrong...or doesn't it work that way?
pawn Код:
if(strcmp(cmdtext, "/freevip", true) == 0)
{
new PlayerFile[256]; PlayerFile = GetPlayerFile(playerid);
new expire = gettime() + 30*24*60*60;
Variables[playerid][pVIP] = 1;
Variables[playerid][pVIPDate] = expire;
new INI:PFile = INI_Open(PlayerFile);
INI_WriteInt(PFile,"VIP",1);
INI_WriteInt(PFile,"VIPDate", expire);
INI_Close(PFile);
SendCMDText(playerid,"VIP level 1 activated for 30 days!");
return 1;
}
if(strcmp(cmdtext, "/vipdate", true) == 0)
{
new GetVIPDate = Variables[playerid][pVIPDate];
new string[256];
format(string,256,"VIP Date: %d",GetVIPDate);
SendCMDText(playerid,string);
return 1;
}