10.06.2012, 16:14
Here is my code that i have made so far. There are a few things i need to do to fix it
When an admin types /deleteinactivecars , I want it to delete all cars that are inactive for 15 days.
On this line:
I need it to open all the player files, how can I make it do this?
Код:
if(strcmp(cmd, "/deleteinactivecars", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!(PlayerInfo[playerid][pAdmin] >= 3))
{
return SendClientMessage(playerid,COLOR_GREY,"You are not authorized to use this command.");
}
format(string, sizeof(string), "%s.ini",tmp);
if(dini_Exists(string))
{
if(PlayerInfo[playerid][pActiveCars] <= 15)
{
// my code to delete the car will be here
}
SendClientMessage(playerid, COLOR_GRAD1, " Cars Deleted.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use this command.");
}
}
return 1;
}
On this line:
Код:
format(string, sizeof(string), "%s.ini",tmp);

