Colocando placa nos veнculos -
17uK - 06.11.2012
Olб pessoal. nгo sei direito mexer com PAWN. queria fazer um sistema assim quando eu entro no veiculo aparece do lado direito da tela escrito.
Blista Compact (NMS 001)
Assim quando eu queria seta outro veiculo exemplo BMX
BMX (NMS 002)
Ficou agradecido quem puder me ajudar.
Re: Colocando placa nos veнculos -
duuuwh - 06.11.2012
textdraw..
usa uns velocimetros que tem por aн cara, tem uns atй legalzinhos..
Procura assim: Velocimetro
Que jб vem com as informaзхes do carro completas, velocidade, lataria e etc..
Re: Colocando placa nos veнculos -
claudiosoares - 06.11.2012
Use os seguintes cуdigos:
Coloque no topo da sua GM:
forward Velocimetro(playerid);
Coloque em OnGameModeInit()
SetTimer("Velocimetro", 1000, 1);
Crie uma nova Public e coloque:
public Velocimetro()
{
new Float:Speedo_HP;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gPlayerLogged[i] == 1 && IsPlayerInAnyVehicle(i))
{
new vehicle = GetPlayerVehicleID(i);
GetVehicleHealth(vehicle, Speedo_HP);
new string[128];
format(string,sizeof(string),"~>~Nome: ~r~%s~n~~>~~w~Velocidade: ~r~%d KM/h~n~~>~~w~Gasolina: ~r~%d%%~n~~>~~w~Saude: ~r~%0.0f%%~n~~w~~>~Local:~r~%s" ,vehName[GetVehicleModel(vehicle)-400], GetPlayerSpeed(i, true), Gas[vehicle], Speedo_HP/10, ReturnPlayerZone(i));
TextDrawSetString(Speed[i], string);
if(TextShow[i] == false)
{
TextDrawShowForPlayer(i, Speed[i]);
TextShow[i] = true;
}
}
else
{
if(TextShow[i] == true)
{
TextDrawHideForPlayer(i, Speed[i]);
TextShow[i] = false;
}
}
}
}
Depois sу compilar, espero ter ajudado.
Re: Colocando placa nos veнculos -
Q.I - 06.11.2012
Quote:
Originally Posted by claudiosoares
Use os seguintes cуdigos:
Coloque no topo da sua GM:
forward Velocimetro(playerid);
Coloque em OnGameModeInit()
SetTimer("Velocimetro", 1000, 1);
Crie uma nova Public e coloque:
public Velocimetro()
{
new Float:Speedo_HP;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gPlayerLogged[i] == 1 && IsPlayerInAnyVehicle(i))
{
new vehicle = GetPlayerVehicleID(i);
GetVehicleHealth(vehicle, Speedo_HP);
new string[128];
format(string,sizeof(string),"~>~Nome: ~r~%s~n~~>~~w~Velocidade: ~r~%d KM/h~n~~>~~w~Gasolina: ~r~%d%%~n~~>~~w~Saude: ~r~%0.0f%%~n~~w~~>~Local:~r~%s" ,vehName[GetVehicleModel(vehicle)-400], GetPlayerSpeed(i, true), Gas[vehicle], Speedo_HP/10, ReturnPlayerZone(i));
TextDrawSetString(Speed[i], string);
if(TextShow[i] == false)
{
TextDrawShowForPlayer(i, Speed[i]);
TextShow[i] = true;
}
}
else
{
if(TextShow[i] == true)
{
TextDrawHideForPlayer(i, Speed[i]);
TextShow[i] = false;
}
}
}
}
Depois sу compilar, espero ter ajudado.
|
hum interressante e como funciona esse codigo seu ae me explica ?
Re: Colocando placa nos veнculos -
SirUndead - 06.11.2012
Olб claudiosoares,
Eu adicionei seus cуdigos certinho mas olha os erros que deu em uma linha sу:
Код:
C:\Users\Vinycius Christian\Desktop\Geral RP 0.3e\gamemodes\POU.pwn(9993) : error 017: undefined symbol "vehName"
C:\Users\Vinycius Christian\Desktop\Geral RP 0.3e\gamemodes\POU.pwn(9993) : warning 215: expression has no effect
C:\Users\Vinycius Christian\Desktop\Geral RP 0.3e\gamemodes\POU.pwn(9993) : error 001: expected token: ";", but found "]"
C:\Users\Vinycius Christian\Desktop\Geral RP 0.3e\gamemodes\POU.pwn(9993) : error 029: invalid expression, assumed zero
C:\Users\Vinycius Christian\Desktop\Geral RP 0.3e\gamemodes\POU.pwn(9993) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Pode me ajudar ?
Re: Colocando placa nos veнculos -
@Riichard - 06.11.2012
O copiador copiando do copiador.
OHMAYGODE
Re: Colocando placa nos veнculos -
SirUndead - 06.11.2012
SAUHAHUSAUHSUH
Re: Colocando placa nos veнculos -
DrTHE - 06.11.2012
GameTextForPlayer