help error
#1

Code:
ELC_AC_BASE.inc(1098) : error 025: function heading differs from prototype
Code:
 OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
help pls :/
Reply
#2

PHP Code:
public OnUnoccupiedVehicleUpdate(vehicleidplayeridpassenger_seatFloat:new_xFloat:new_yFloat:new_zFloat:vel_xFloat:vel_yFloat:vel_z
No?
Reply
#3

is the same

I changed
Quote:

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 (CheatPlayerInfo[playerid][elc_AntiVehicleTelportHack]==2&&ELC_AC_IsCreatedVehicle(vehicleid))
{
new Float:elc_tempposx, Float:elc_tempposy, Float:elc_tempposz;
GetVehiclePos(vehicleid, elc_tempposx, elc_tempposy, elc_tempposz);
elc_tempposx = (new_x -elc_tempposx);
elc_tempposy = (new_y -elc_tempposy);
elc_tempposz = (new_z -elc_tempposz);
new Float:XMVDUCM=elc_GetVehicleSpeedXY(vehicleid)+MAX _VEHICLE_DISTANCE_UCM;
if(CheatVehicleInfo[vehicleid][elc_vStatut]==0&&!((elc_tempposx < XMVDUCM) && (elc_tempposx > -XMVDUCM)) && ((elc_tempposy < XMVDUCM) && (elc_tempposy > -XMVDUCM)) && ((elc_tempposz < XMVDUCM) && (elc_tempposz > -XMVDUCM)))
{
SetVehiclePos(vehicleid, elc_tempposx, elc_tempposy, elc_tempposz);
SetVehicleZAngle(vehicleid,CheatVehicleInfo[vehicleid][elc_vAngle]);
if(CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]==0)
{
CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]=playerid+1;
SaveTime(CheatVehicleInfo[vehicleid][elc_vPossibleHackTime],GetTickCount());
CheatPlayerInfo[playerid][elc_PossibleVehicleHack]=vehicleid;
}
else
{
CheatVehicleInfo[vehicleid][elc_vPossibleHackTime]=0;
if(IsPlayerConnected(CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]-1))CheatPlayerInfo[CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]-1][elc_PossibleVehicleHack]=0;
CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]=0;
}
return 0;
}
else
{
if(CheatVehicleInfo[vehicleid][elc_vStatut]==1)CheatVehicleInfo[vehicleid][elc_vStatut]=0;
CheatVehicleInfo[vehicleid][elc_vX]=new_x;
CheatVehicleInfo[vehicleid][elc_vY]=new_y;
CheatVehicleInfo[vehicleid][elc_vZ]=new_z;
GetVehicleZAngle(vehicleid,CheatVehicleInfo[vehicleid][elc_vAngle]);
}
if(CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]!=0 && playerid!=INVALID_PLAYER_ID && CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]!=playerid+1)
{
CheatVehicleInfo[vehicleid][elc_vPossibleHackTime]=0;
if(IsPlayerConnected(CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]-1))CheatPlayerInfo[CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]-1][elc_PossibleVehicleHack]=0;
CheatVehicleInfo[vehicleid][elc_vPossiblePlayerHack]=0;
}
}
#if defined INCLUDE_BASE_MODE
return CallLocalFunction("ELC_AC_OnUnoccupiedVehicle", "dddffffff",vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); // <====
#else
return 1;
#endif
}
/*----------------------------------------------------------------------------*/
#if defined INCLUDE_BASE_MODE
//ALS_SYSTEME --------------------
#if defined _ALS_OnUnoccupiedVehicleUpdate
#undef OnUnoccupiedVehicleUpdate
#else
#define _ALS_OnUnoccupiedVehicleUpdate
#endif
#define OnUnoccupiedVehicleUpdate ELC_AC_OnUnoccupiedVehicle
forward ELC_AC_OnUnoccupiedVehicle(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); // <====
#endif

Reply
#4

Are you sure? Are you using latest includes? If not I recommend update your samp package to the latest one.
Reply
#5

This Anti-Cheat is SOOO old...

Don't just change random things to try fix the issue you have.

Code:
OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z)
That is what it's SUPPOSED to be in the include, but at the time of it being written there was no native OnUnoccupiedVehicleUpdate...

Seriously, it's old, and you'll need to update it to be compatible, or find another script to get an anti-cheat going. Simply changing random things in the hope that it will fix something, is a very lazy and terrible way of doing things.
Reply
#6

ok thanks

I did not know but I saw that they were 0.3c functions thank you very much
Reply
#7

I haven't looked into it in detail, but you may be able to update it to the latest methods, without too much hassle.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)