[Ajuda] Velocimetro nгo aparece - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Velocimetro nгo aparece (
/showthread.php?tid=473830)
Velocimetro nгo aparece -
Powers - 04.11.2013
Bom Pessoal estou criando um gamemode do 0, estou adptando ele aos poucos , mais tem um problema eu criei um velocimetro no meu GM antigo e passei ele pro novo gm que tou criando
new.pwn
Bom atй agora eu coloquei 1 veiculo no servidor olha as defines que coloquei
PHP код:
#if defined MAX_VEHICLES
#undef MAX_VEHICLES
#define MAX_VEHICLES (1)
#endif
#if defined MAX_PLAYERS
#undef MAX_PLAYERS
#define MAX_PLAYERS (1)
#endif
1 veiculo que coloquei
e 1 jogador que й eu no momento.
Re: Velocimetro nгo aparece -
Coe1 - 04.11.2013
E...Cadк o cуdigo do velocнmetro?
Re: Velocimetro nгo aparece -
Powers - 04.11.2013
O Codigo esta ai
PHP код:
Velocimetro(playerid);
public Velocimetro()
{
new Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
new Float:Speedo_HP;
new GasEtempo[MAX_PLAYERS],ResultOwn[MAX_PLAYERS];
for(new i=0; i<MAX_PLAYERS; i++)
{
new vehicle = GetPlayerVehicleID(i);
new modeloo = GetVehicleModel(vehicle);
if(modeloo == 481 || modeloo == 509 || modeloo == 510)
{
return 1;
}
if(JogadorOnline[i] == 1 && IsPlayerInAnyVehicle(i))
{
GetPlayerPos(i, Speedo_X, Speedo_Y, Speedo_Z);
GetVehicleHealth(vehicle, Speedo_HP);
GasEtempo[i] = Gas[vehicle]*30;
ResultOwn[i] = GasEtempo[i]/60;
new velopet0[300];
format(velopet0,sizeof(velopet0),"~w~~u~Combustivel~p~: ~g~~h~~h~%d%%~n~~w~~u~Lataria~p~: ~r~%0.0f%%~n~~w~~u~Veiculo~p~: ~b~~h~%s(%i)~n~~w~~u~Velocidade~p~: ~y~~h~%d KM/H~n~~w~~u~Blindagem~p~: ~r~~h~~h~~h~%i%%~n~~w~~u~Gas Tempo~p~: ~p~~h~%d Minutos~n~~w~~u~Local~p~: ~b~~h~~h~~h~%s~n~",
Gas[vehicle],Speedo_HP/10,VeiculosNomes[GetVehicleModel(GetPlayerVehicleID(i))-400],GetVehicleModel(vehicle),GetPlayerSpeed(i, true),blindagemBPN[GetPlayerVehicleID(i)],ResultOwn[i],ReturnPlayerZone(i));
TextDrawSetString(VeloPet[i], velopet0);
SavePlayerPos[i][sX] = Speedo_X, SavePlayerPos[i][sY] = Speedo_Y, SavePlayerPos[i][sZ] = Speedo_Z;
if(TextShow[i] == false)
{
TextDrawHideForPlayer(i, ForumSite[i]);
TextDrawShowForPlayer(i, VeloPet[i]);
TextShow[i] = true;
}
}
else
{
if(TextShow[i] == true)
{
TextDrawShowForPlayer(i, ForumSite[i]);
TextDrawHideForPlayer(i, VeloPet[i]);
TextShow[i] = false;
}
}
}
return 1;
}