• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] SA-MP Server crashes
#5
Try this

PHP Code:
// Convert function
Convert(number)
{
    new 
hours 0mins 0secs 0string[100];
    
hours floatround(number 3600);
    
mins floatround((number 60) - (hours 60));
    
secs floatround(number - ((hours 3600) + (mins 60)));
    if (
hours 0
        
format(stringsizeof(string), "%d:%02d:%02d"hoursminssecs);
    else 
        
format(stringsizeof(string), "%d:%02d"minssecs);
    return 
string;
}

// Satiety update logic
if (PI[playerid][pSettings][5] == 1) {
    new 
st_string[10], Float:st_count PI[playerid][pSatiety] * 0.78;
    
format(st_stringsizeof(st_string), "%d%%"PI[playerid][pSatiety]);
    
PlayerTextDrawSetString(playeridSatiety_PTD[playerid][4], st_string);
    
PlayerTextDrawTextSize(playeridSatiety_PTD[playerid][0], st_count5.0);
    for (new 
t!= 14t++) 
        
TextDrawShowForPlayer(playeridSatiety_TD[t]);
    for (new 
t!= 6t++) 
        
PlayerTextDrawShow(playeridSatiety_PTD[playerid][t]);
    if (
Satiety_Timer[playerid] == -1) {
        
Satiety_Timer[playerid] = SetTimerEx("SatietyUPDATE"10001"i"playerid);
        
Satiety_Time[playerid] = 10;
    }
}

// Selfie system
GetPlayerPos(playeridselfi1[playerid][0], selfi1[playerid][1], selfi1[playerid][2]);
new 
Float:n1XFloat:n1YFloat:Selfi1;
GetPlayerFacingAngle(playeridSelfi1);
n1X selfi1[playerid][0] + selfi3 floatcos(180.0degrees);
n1Y selfi1[playerid][1] + selfi3 floatsin(180.0degrees);
SetPlayerAttachedObject(playerid01886860.060.010.08180.090.00.0);
SetPlayerCameraPos(playeridn1Xn1Yselfi1[playerid][2] + selfi4);
SetPlayerCameraLookAt(playeridselfi1[playerid][0], selfi1[playerid][1], selfi1[playerid][2] + 1);
SetPlayerFacingAngle(playeridselfi2[playerid] - 270.0);
TogglePlayerControllable(playerid0); 
  Reply


Messages In This Thread
SA-MP Server crashes - by LevanBedinashvili - 2024-03-08, 05:29 PM
RE: SA-MP Server crashes - by LevanBedinashvili - 2024-03-08, 06:48 PM
RE: SA-MP Server crashes - by N0FeaR - 2024-03-09, 02:20 AM
RE: SA-MP Server crashes - by LevanBedinashvili - 2024-03-09, 02:08 PM
RE: SA-MP Server crashes - by N0FeaR - 2024-03-09, 07:46 PM

Forum Jump: