SA-MP Forums Archive
help error - 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)
+--- Thread: help error (/showthread.php?tid=630383)



help error - SheerlockHolmess - 13.03.2017

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 :/


Re: help error - Dayrion - 13.03.2017

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


Respuesta: help error - SheerlockHolmess - 13.03.2017

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




Re: help error - BlackbirdXd - 13.03.2017

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


Re: help error - Sew_Sumi - 13.03.2017

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.


Respuesta: help error - SheerlockHolmess - 13.03.2017

ok thanks

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


Re: help error - Sew_Sumi - 13.03.2017

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