16.10.2012, 01:31
PHP код:
public Speedo()
{
static
playerid
;
playerid = GetMaxPlayers();
for( ; playerid > -1; --playerid){
if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
{
//CHECAR VELOCIDADE
new string[128];
format(string,sizeof(string),"%dKM/H", VelocidadeKM(playerid));
TextDrawSetString(Text:Textdraw91, string);
TextDrawShowForPlayer(playerid, Textdraw91);
//CHECAR LATARIA
GetVehicleHealth(GetPlayerVehicleID(playerid), Lataria);
format(string,sizeof(string),"Lataria: %0.0f%%", Lataria);
TextDrawSetString(Textdraw131, string);
TextDrawShowForPlayer(playerid, Textdraw131);
//CHECAR VEICULO
format(string,sizeof(string),"Veiculo: %s", Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
TextDrawSetString(Textdraw141, string);
TextDrawShowForPlayer(playerid, Textdraw141);
// Checar gasolina
format(string,sizeof(string),"Gasolina: %d%", Gas[GetPlayerVehicleID(playerid)]);
TextDrawSetString(Textdraw101, string);
TextDrawShowForPlayer(playerid, Textdraw101);
}
}