18.07.2010, 11:36
Why is this timer not showing up properly the text draw?
It doesnt bug other textdraw (in this case the clock) if i dont show it (the gas one)
It doesnt bug other textdraw (in this case the clock) if i dont show it (the gas one)
pawn Код:
public CheckGas()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
//-----------------------------------------------------------------
if (IsPlayerInAnyVehicle(i)){
if (VehicleInfo[GetPlayerVehicleID(i)][buybar] == 0){
return 1;
}
new GasString[256];
new TBarZone[MAX_ZONE_NAME];
GetPlayer2DZone(i, TBarZone, MAX_ZONE_NAME); // Location
TextDrawHideForPlayer(i,GASTD[i]);
VehicleInfo[GetPlayerVehicleID(i)][gas]=VehicleInfo[GetPlayerVehicleID(i)][gas]-1;
format(GasString, sizeof(GasString), "] %s ] %s ] Gas: %d % ]", TBarZone, VehicleInfo[GetPlayerVehicleID(i)][name], VehicleInfo[GetPlayerVehicleID(i)][gas]);
TextDrawSetString(GASTD[i],GasString);
TextDrawShowForPlayer(i,GASTD[i]);
return 1;
}
//-----------------------------------------------------------------
new GasString[256];
new TBarZone[MAX_ZONE_NAME];
GetPlayer2DZone(i, TBarZone, MAX_ZONE_NAME); // Location
TextDrawHideForPlayer(i,GASTD[i]);
format(GasString, sizeof(GasString), "] %s ]", TBarZone);
TextDrawSetString(GASTD[i],GasString);
TextDrawShowForPlayer(i,GASTD[i]);
return 1;
}
}
return 1;
}