26.07.2011, 17:24
(
Последний раз редактировалось spaty2; 26.07.2011 в 20:01.
)
DELETE PLEASE
}
else if(dialogid == 138)
{
if(GetPVarInt(playerid, "CarLicenses") == 2)
{
SetPVarInt(playerid, "CarLicenses", 0); // dont have license yet
PlayerData[playerid][Step] = 0;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(PlayerData[playerid][Vehicle]);
}
else if(GetPVarInt(playerid, "CarLicenses") == 1) // have license now
{
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;