Игрок зависает в паблике, но не крашится. (Свой таймер)
#1

Или в этом:
PHP Code:
public Drift()
{
    new 
Float:Angle1Float:Angle2Float:BySpeedFloat:ZZZFloat:XXXFloat:YYYFloat:SpeedX;
    for(new 
g=0;g<200;g++)
    {
        
GetPlayerPos(gXXXYYYZZZ);
        
SpeedX floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(XXX,SavedPos][ sX ])),2),floatpower(floatabs(floatsub(YYY,SavedPos][ sY ])),2)),floatpower(floatabs(floatsub(ZZZ,SavedPos][ sZ ])),2)));
        
Angle1 ReturnPlayerAngle(g);
        
Angle2 GetPlayerTheoreticAngle(g);
        
BySpeed floatmul(SpeedX12);
        if(
IsPlayerInAnyVehicle(g) && floatabs(floatsub(Angle1Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1Angle2)) < DRIFT_MAXKAT && BySpeed DRIFT_SPEED)
        {
            if(
PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
            
PlayerDriftCancellation[g] = 0;
            
DriftPointsNow[g] += floatval(floatabs(floatsub(Angle1,Angle2))*3*(BySpeed*0.1))/10;
            
PlayerDriftCancellation[g] = SetTimerEx("DriftExit"30000"d"g);
        }
        if(
DriftPointsNow[g] > 70 && DriftPointsNow[g] < 10000)
        {
            
TextDrawShowForPlayer(g,TDLabels);
            
TextDrawShowForPlayer(g,TDValueDrift[g]);
            new 
DPs[128];
            
valstr(DPs,DriftPointsNow[g],false);
            
TextDrawSetString(TDValueDrift[g],DPs);
            
////////////////////////////////////////
        
}
        
SavedPos[g][sX] = XXX;
        
SavedPos[g][sY] = YYY;
        
SavedPos[g][sZ] = ZZZ;
    }

или в этом

PHP Code:
public CheckPlayerState()
{
    new 
i,cs;
    for(
i=0;i<=MAX_PLAYERS;i++)
    {
        
cs=GetPlayerState(i);
        if(
DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>2)
        {
            new 
Float:h;
            
GetVehicleHealth(GetPlayerVehicleID(i),h);
            if(
h<HealthInit[i])
            {
                
KillTimer(DriftTimer[i]);
                
DriftExit(i);
                
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~r~DRIFT OTMEHEH!",800,5);
                
DriftMode[i]=false;
            }
        }
        if(
cs==PLAYER_STATE_DRIVER && DriftMode[i]==false)
        {
            if(
GetVType(GetPlayerVehicleID(i)))
            
DriftMode[i]=true;
            
GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
            
AutoFixBool[i]=false;
            
DriftTimer[i]=SetTimerEx("Drift"200true"i"i);
        }
        else if(
cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true)
        {
            
KillTimer(DriftTimer[i]);
            
DriftMode[i]=false;
            
AutoFixBool[i]=true;
        }
    }
    return 
1;

PHP Code:
public DriftExit(playerid)
{
    
PlayerDriftCancellation[playerid] = 0;
    new 
Float:h;
    
GetVehicleHealth(GetPlayerVehicleID(playerid),h);
    if(
DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid])
    {
        new 
string[80];
        
GivePlayerMoneyEx(playerid,DriftPointsNow[playerid]);
        if(
DriftPointsNow[playerid] < 500)
        {
             
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
        else if(
DriftPointsNow[playerid] >= 500 && DriftPointsNow[playerid] < 1000)
        {
             
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
             
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+1 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
        else if(
DriftPointsNow[playerid] >= 1000 && DriftPointsNow[playerid] <2000)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+2);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+2 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
        else if(
DriftPointsNow[playerid] >= 2000 && DriftPointsNow[playerid] <2500)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+3);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+3 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
         else if(
DriftPointsNow[playerid] >= 2500 && DriftPointsNow[playerid] <3200)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+4);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+4 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
         else if(
DriftPointsNow[playerid] >= 3200 && DriftPointsNow[playerid] <4200)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+5);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+5 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
         else if(
DriftPointsNow[playerid] >= 4200 && DriftPointsNow[playerid] <5000)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+6);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+6 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
         else if(
DriftPointsNow[playerid] >= 5000 && DriftPointsNow[playerid] <5900)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+7);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+7 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
        else if(
DriftPointsNow[playerid] >= 5900 && DriftPointsNow[playerid] <6800)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+8);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+8 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
        else if(
DriftPointsNow[playerid] >= 6800 && DriftPointsNow[playerid] <7600)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+9);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+9 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
         else if(
DriftPointsNow[playerid] >= 7600 && DriftPointsNow[playerid] <8400)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+10 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
          else if(
DriftPointsNow[playerid] >= 8400 && DriftPointsNow[playerid] <9200)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+11);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+11 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
         else if(
DriftPointsNow[playerid] >= 9200 && DriftPointsNow[playerid] <10000)
        {
            
SetPlayerScore(playerid,GetPlayerScore(playerid)+12);
            
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~r~+12 ~w~SCORE~n~~r~+%d~w~$",DriftPointsNow[playerid]);
        }
        
GameTextForPlayer(playerid,string,1000,5);
        
UpdateScore(playerid);
    }
    
TextDrawHideForPlayer(playerid,TDLabels);
    
TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
    
AutoFixBool[playerid]=true;
    
SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
    
////////////////////////////////////////////////////
    
DriftPointsNow[playerid] = 0;

PHP Code:
GetVType(vid)
{
    switch(
GetVehicleModel(vid))
    {
        case 
480533439555499422482498609524578455403414,
        
582443514413515440543605459531408552478456554,
        
536575534567535566576412568424573579400500444,
        
556557489505595416433431438437523427490528561,
        
407544596597598599601420445504401518527479458,
        
542507562585419526604466492474546517410551516,
        
467600426436547405580560550549540491529421602,
        
429496402541415589587565494502503411559603475,
        
506451558477418404: return 1;
        default: return 
0;
    }
    return 
0;

Вызывается первый, он включает второй в проверке, затем по таймеру во второй врубается третий. Текстдрав во втором зависает, иногда пробивается третий паблик со своими геймтекстами, однако текстдрав не пропадает. При этом не прогружаются текстуры (стример инкогнито), не работает чат и команды. Что бы это?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)