30.01.2018, 16:21
(
Последний раз редактировалось Mkssid; 05.02.2018 в 04:41.
)
Script:
Include:
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid) // line 8042
{
for(new x=0; x<MAX_PLAYERS; x++)
{
if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && AccInfo[x][SpecID] == playerid)
{
TogglePlayerSpectating(x, 1);
PlayerSpectateVehicle(x, vehicleid);
AccInfo[x][SpecType] = ADMIN_SPEC_TYPE_VEHICLE;
}
}
return 1;
}
PHP код:
#if defined _inc_y_hooks || defined _INC_y_hooks
hook OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
#else
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
#endif
{
if(!IsPlayerConnected(playerid) || ACInfo[playerid][acKicked]) return 0;
new ac_gtc = GetTickCount();
if(ACInfo[playerid][acACAllow][49])
{
if(ac_gtc < ACInfo[playerid][acCall][6] + ac_Mtfc[6][0]) return ac_FloodDetect(playerid, 6);
if(ac_gtc < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
else ACInfo[playerid][acFloodCount][6] = ACInfo[playerid][acFloodCount][27] = 0;
}
ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][6] = ac_gtc;
new ac_model = GetVehicleModel(vehicleid) - 400;
if(ACInfo[playerid][acACAllow][44] && ac_model < 0) return ac_KickWithCode(playerid, "", 0, 44, 1);
if(ACInfo[playerid][acEnterVeh] != vehicleid)
{
new ac_tmpPrm1, ac_tmpPrm2;
GetVehicleParamsEx(vehicleid, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm1, ac_tmpPrm2, ac_tmpPrm2, ac_tmpPrm2);
if(ispassenger || ac_tmpPrm1 != VEHICLE_PARAMS_ON)
{
ACInfo[playerid][acEnterVeh] = vehicleid;
if(ac_model == 170 || 30 <= ac_model <= 195 && ac_vType[ac_model] == 3) ACInfo[playerid][acEnterVehTime] = 0;
else ACInfo[playerid][acEnterVehTime] = ac_gtc;
}
}
#if !defined _inc_y_hooks && !defined _INC_y_hooks\
&& defined ac_OnPlayerEnterVehicle
return ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); //line 4750
#else
return 1;
#endif
}
PHP код:
#if !defined _inc_y_hooks && !defined _INC_y_hooks
#if defined _ALS_OnPlayerEnterVehicle
#undef OnPlayerEnterVehicle
#else
#define _ALS_OnPlayerEnterVehicle
#endif
#define OnPlayerEnterVehicle ac_OnPlayerEnterVehicle
#if defined ac_OnPlayerEnterVehicle
return forward ac_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger); //line 4764
#endif
#endif
Код:
pawno\include\nex-ac.inc(4750) : warning 202: number of arguments does not match definition pawno\include\nex-ac.inc(4764) : error 010: invalid function or declaration Admin.pwn(8042) : warning 235: public function lacks forward declaration (symbol "ac_OnPlayerEnterVehicle") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.