28.07.2011, 10:53
I need command for Cops that will delete Driving License
There you have something what can help
I have CarLicenses folder in Scriptfiles and there are name, if there is name of char. he have license
if not he doesnt, if /removedlic, name will dissapear and person who had it, dont have itn ow
There you have something what can help
pawn Код:
if(GetPVarInt(playerid, "CarLicenses") == 2)
{
SetPVarInt(playerid, "CarLicenses", 0);
PlayerData[playerid][Step] = 0;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(PlayerData[playerid][Vehicle]);
}
else if(GetPVarInt(playerid, "CarLicenses") == 1)
{
new pname[MAX_PLAYER_NAME], string[100];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "CarLicenses/%s.ini", pname);
new File:sgt_file = fopen(string, io_write);
new day, year, month;
getdate(year, month, day);
format(string, sizeof(string), "%s is owning this driving license since: %d/%d/%d\r\n", pname, day, month, year);
fwrite(sgt_file, string);
fclose(sgt_file);
PlayerData[playerid][Step] = 0;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(PlayerData[playerid][Vehicle]);
}
}
return 1;
}
if not he doesnt, if /removedlic, name will dissapear and person who had it, dont have itn ow