arbooz004
Ученик
Код:
|
public OnEnterExitModShop(playerid, enterexit, interiorid)
{
if(ACInfo[playerid][acKicked] > 0) return 0;
#if !AC_USE_TUNING_GARAGES
if(ACInfo[playerid][acACAllow][23]) ac_KickWithCode(playerid, "", 0, 23, 1);
#else
if(ACInfo[playerid][acACAllow][23] &&
(!(0 <= enterexit <= 1) || !(0 <= interiorid <= 3))) ac_KickWithCode(playerid, "", 0, 23, 7);
#endif
new ac_i = GetTickCount();
if(ACInfo[playerid][acACAllow][49])
{
if(ac_i < ACInfo[playerid][acCall][1] + ac_Mtfc[1][0]) ac_FloodDetect(playerid, 1);
else if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
else ACInfo[playerid][acFloodCount][1] = ACInfo[playerid][acFloodCount][27] = 0;
}
ACInfo[playerid][acModShop] = !!enterexit;
ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][1] = ac_i;
ACInfo[playerid][acSetPosTick] = ACInfo[playerid][acGtc][19] = ac_i + 3250;
new ac_vehid = ACInfo[playerid][acVeh];
if(ACInfo[playerid][acKicked] < 1)
{
ac_i = interiorid % 256;
ACVehInfo[ac_vehid][acInt] = ac_i;
#if defined foreach
foreach(new ac_j : Player)
{
if(ACInfo[ac_j][acVeh] == ac_vehid) ACInfo[ac_j][acInt] = ac_i;
}
#else
#if defined GetPlayerPoolSize
for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
#else
for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
#endif
{
if(IsPlayerInVehicle(ac_j, ac_vehid)) ACInfo[ac_j][acInt] = ac_i;
}
#endif
}
else
{
#if defined foreach
foreach(new ac_j : Player)
{
if(ACInfo[ac_j][acVeh] == ac_vehid)
{
if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
else ACInfo[ac_j][acIntRet] = 1;
}
}
#else
#if defined GetPlayerPoolSize
for(new ac_j = GetPlayerPoolSize(); ac_j >= 0; --ac_j)
#else
for(new ac_j = MAX_PLAYERS - 1; ac_j >= 0; --ac_j)
#endif
{
if(IsPlayerInVehicle(ac_j, ac_vehid))
{
if(ACInfo[ac_j][acUnFrozen]) ACInfo[ac_j][acIntRet] = 2;
else ACInfo[ac_j][acIntRet] = 1;
}
}
#endif
}
#if defined ac_OnEnterExitModShop //3890
return ac_OnEnterExitModShop(playerid, enterexit, interiorid);
#else
return 1;
#endif
}
