16.08.2018, 21:10
I wanna show 2 different messages to cops and player, so i made in this way:
1st if you don't have vehicle license, 2nd if you have a license but you still rob the car.
But i'm sure there is a better way to do this, can you help me? Thanks.
pawn Код:
if (IsDoorVehicle(vehicleid) && Player[playerid][VehicleLicense] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "* Commited a crime: (Driving without a valid driving license) - Your wanted level has been increased.");
SetPlayerWantedLevelEx(playerid, GetPlayerWantedLevel(playerid)+1);
format(string,sizeof(string),"* [Law Enforcement Radio]: Vehicle theft without license (%s) by %s (%d) - Zone:", ReturnVehicleName(vehicleid), ReturnPlayerName(playerid), playerid);
SendMessageToCops(string);
}
else if (IsDoorVehicle(vehicleid) && Player[playerid][VehicleLicense] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "* Commited a crime: (Vehicle Theft) - Your wanted level has been increased.");
SetPlayerWantedLevelEx(playerid, GetPlayerWantedLevel(playerid)+1);
format(string,sizeof(string),"* [Law Enforcement Radio]: Vehicle theft (%s) by %s (%d) - Zone:", ReturnVehicleName(vehicleid), ReturnPlayerName(playerid), playerid);
SendMessageToCops(string);
}
But i'm sure there is a better way to do this, can you help me? Thanks.