04.11.2014, 20:43
PHP код:
HackDetect.pwn(553) : error 025: function heading differs from prototype
PHP код:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
{
if(GetTickCountDifference(GetTickCount(), vt_MovedFarTick[vehicleid]) < 5000)
return 1;
if(GetTickCountDifference(GetTickCount(), GetPlayerSpawnTick(playerid)) < 15000)
return 1;
if(GetTickCountDifference(GetTickCount(), GetPlayerVehicleExitTick(playerid)) < 5000)
return 1;
if(GetTickCountDifference(GetTickCount(), GetVehicleLastUseTick(vehicleid)) < 1000)
return 1;
if(IsVehicleOccupied(vehicleid))
return 1;
new
Float:x,
Float:y,
Float:z,
Float:distance;
GetVehiclePos(vehicleid, x, y, z);
distance = Distance(x, y, z, new_x, new_y, new_z);
if(IsNaN(distance))
{
RespawnVehicle(vehicleid);
return 1;
}
if(VEHICLE_TELEPORT_DISTANCE < distance < 500.0)
{
new Float:distancetoplayer = 10000.0;
vt_MovedFarPlayer[vehicleid] = GetClosestPlayerFromPoint(x, y, z, distancetoplayer);
if(distancetoplayer < 10.0)
{
vt_MovedFar[vehicleid] = true;
vt_MovedFarTick[vehicleid] = GetTickCount();
foreach(new i : veh_Index)
{
if(GetVehicleTrailer(i) == vehicleid)
return 1;
}
new
name[MAX_PLAYER_NAME],
vehicletype,
vehiclename[MAX_VEHICLE_TYPE_NAME],
owner[MAX_PLAYER_NAME],
reason[128],
info[128];
GetPlayerName(vt_MovedFarPlayer[vehicleid], name, MAX_PLAYER_NAME);
vehicletype = GetVehicleType(vehicleid);
GetVehicleTypeName(vehicletype, vehiclename);
GetVehicleOwner(vehicleid, owner);
if(isnull(owner))
format(reason, sizeof(reason), "Teleported a %s %.0fm", vehiclename, distance);
else
format(reason, sizeof(reason), "Teleported a %s (%s's) %.0fm", vehiclename, owner, distance);
format(info, sizeof(info), "%f, %f, %f", new_x, new_y, new_z);
ReportPlayer(name, reason, -1, REPORT_TYPE_CARTELE, x, y, z, info);
// RespawnVehicle(vehicleid);
return 0;
}
}
return 1;
}