(HELP) /removedlic COMMAND - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: (HELP) /removedlic COMMAND (
/showthread.php?tid=272426)
(HELP) /removedlic COMMAND -
spaty2 - 28.07.2011
I need command for Cops that will delete Driving License
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;
}
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