18.04.2015, 21:59
Bom eu estou codando uma GM FreeRoam entгo estava fazendo um contador simples de drift, e entгo eis que deu um erro(Nгo no copilador), o erro e o seguinte o player entra in-game mas nгo passa deste ponto:
Entгo no console aparece o seguinte:
Ae eu pesquisei e cheguei neste tуpico: https://sampforum.blast.hk/showthread.php?tid=413146
Porйm quando retiro o script que fiz volta a funcionar normalmente sem lag nenhum. Aqui esta o script para aqueles que queiram me ajudar a concertalo:
Ele esta "adaptado" ao meu gamemode e todas as funзхes, ou variaveis usadas neles funcionam perfeitamente
Obrigado :-
Код:
{FFFFFF}SA-MP {B9C9BF}0.3z-R2 {FFFFFF}Started Connecting to 127.0.0.1:7777... Connected. Joining the game... Server closed the connection.
Код:
Kicking 127.0.0.1 because they didn't logon to the game.
Porйm quando retiro o script que fiz volta a funcionar normalmente sem lag nenhum. Aqui esta o script para aqueles que queiram me ajudar a concertalo:
PHP код:
// Callbacks:
Minigame_OnGameModeInit()
{
DriftSet_DamageCheck();
DriftSet_UpdateDelay(8);
DriftSet_Divider(3000);
DriftSet_StartEndDelay(30);
DriftSet_MinimalAngle(15.5);
DriftSet_MinimalSpeed(30.5);
TextDrift = TextDrawCreate(504.400177, 263.073181, "Drift");
TextDrawLetterSize(TextDrift, 0.478125, 2.055001);
TextDrawAlignment(TextDrift, 1);
TextDrawColor(TextDrift, 16711935);
TextDrawSetOutline(TextDrift, 1);
TextDrawBackgroundColor(TextDrift, 255);
TextDrawFont(TextDrift, 2);
}
Minigame_OnPlayerConnect(playerid)
{
PlayerTextDrift[playerid] = CreatePlayerTextDraw(playerid,521.900146, 281.156616, "~g~~h~+_0");
PlayerTextDrawLetterSize(playerid,PlayerTextDrift[playerid], 0.461875, 1.903335);
PlayerTextDrawAlignment(playerid,PlayerTextDrift[playerid], 1);
PlayerTextDrawColor(playerid,PlayerTextDrift[playerid], -1);
PlayerTextDrawSetOutline(playerid,PlayerTextDrift[playerid], 1);
PlayerTextDrawBackgroundColor(playerid,PlayerTextDrift[playerid], 255);
PlayerTextDrawFont(playerid,PlayerTextDrift[playerid], 2);
return true;
}
public OnPlayerDriftStart(playerid)
{
if(!(getBit4(Minigame,playerid)))
{
TextDrawShowForPlayer(playerid, TextDrift);
PlayerTextDrawSetString(playerid, PlayerTextDrift[playerid], "~g~~h~+_0");
PlayerTextDrawShow(playerid, PlayerTextDrift[playerid]);
}
return true;
}
public OnPlayerDriftUpdate(playerid,value,combo,flagid,Float:distance,Float:speed)
{
if(!(getBit4(Minigame,playerid)))
{
Formatar(str,70,"~g~~h~+_%d",value);
PlayerTextDrawSetString(playerid, PlayerTextDrift[playerid], str);
}
return true;
}
public OnPlayerDriftEnd(playerid,value,combo,reason)
{
if(!(getBit4(Minigame,playerid)))
{
switch(reason)
{
case 0:
{
Formatar(str,70,"~g~~h~+_%d",value);
PlayerTextDrawSetString(playerid, PlayerTextDrift[playerid], str);
SetTimerEx("DriftEnd", 1500, false, "dd",playerid,value);
}
default:
{
Formatar(str,70,"~r~~h~%d",value);
PlayerTextDrawSetString(playerid, PlayerTextDrift[playerid], str);
}
}
}
return true;
}
// Timer:
Timer: DriftEnd(playerid,value)
{
TextDrawHideForPlayer(playerid, TextDrift);
PlayerTextDrawHide(playerid, PlayerTextDrift[playerid]);
new exp = floatround(value / 10);
Formatar(str,70,"+_%d",exp);
PlayerTextDrawSetString(playerid, PlayerTextExp[playerid], str);
TextDrawShowForPlayer(playerid, TextExp);
PlayerTextDrawShow(playerid, PlayerTextExp[playerid]);
return true;
}
Obrigado :-