03.12.2018, 11:17
pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
printf("[OnVehicleMod]: '%s(%d)' has attached %d on %d", pName[playerid], playerid, componentid, vehicleid);
if(BoughtVehicle[playerid] == true)
{
if(vehicleid == PlayerVehicle[playerid])
{
SavePVComponents(playerid, componentid);
}
}
if(GetPlayerInterior(playerid) == 0)
{
format(str, sizeof(str), "* ADMIN-MSG: "GREY_E"%s(%i) has attempted to install an invalid vehicle mod.", pName[playerid], playerid);
SendAdminMessage(COLOR_RED, str);
return 0;
}
new vehicleide = GetVehicleModel(vehicleid);
new modok = islegalcarmod(vehicleide, componentid);
if (!modok)
{
printf("[invalid_mod] %s %d %d %d %d", pName[playerid], playerid, vehicleid, vehicleide, componentid);
format(str, sizeof(str), "4Anti-Cheat 4%s(%i) has been kicked for attempting to install an invalid vehicle mod.", pName[playerid], playerid);
IRC_GroupSay(ircGroup, IRC_CHANNEL, str), IRC_GroupSay(ircGroup, IRC_aCHANNEL, str);
format(str, sizeof(str), ""GREY_E"Anti-Cheat: "RED_E"%s(%i) has been kicked for attempting to install an invalid vehicle mod.", pName[playerid], playerid);
SendClientMessageToAll(COLOR_RED, str);
Kick(playerid);
return 0;
}
return 1;
}