04.03.2015, 10:39
hello.
they are so that I want to change my speedometer and fuel text from
image 1 to image 2 if possible, hope someone can help me with it.
-----------------------------------------------------------------------------------------------------------------------------------
This is the script from image 1
Public CheckGas ()
*{
**new string [256];
**for (new i = 0; i <MAX_PLAYERS; i ++)
***{
******if (IsPlayerConnected (in) && IsPlayerInAnyVehicle (in))
*******{
**********if (speedo [i] == 1 && aMessage [i] == 0 && Count [i] == 0 && bizmsg [i] == 0)
{
new Float: x, Float: y, Float: z;
************new Float: distance, value;
************New filename [256];
************format (filename, sizeof (filename), "% d", GetPlayerVehicleID (i));
************GetPlayerPos (i, x, y, z);
************distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePla yerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
************value = floatround (distance * 11000);
************format (string, sizeof (string), "~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ y ~ Speed: ~ w ~% d ~ r ~ ~ n ~~ y ~ Fuel: ~ w ~% d / 100, "floatround (value / 2200), Vehicle info [GetPlayerVehicleID (i)] [gas]);
GameTextForPlayer (i, string, 850.3);
************SavePlayerPos [i] [LastX] = x;
************SavePlayerPos [i] [Lasty] = y;
************SavePlayerPos [i] [LastZ] = z;
}
if (speedo [i] == 2 && aMessage [i] == 0 && Count [i] == 0)
{
new Float: x, Float: y, Float: z;
************new Float: distance, value;
************New filename [256];
************format (filename, sizeof (filename), "% d", GetPlayerVehicleID (i));
************GetPlayerPos (i, x, y, z);
************distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePla yerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
************value = floatround (distance * 11000);
************format (string, sizeof (string), "~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ y ~ Speed: ~ w ~% d ~ r ~ ~ n ~~ y ~ Fuel: ~ w ~ N / A ", floatround (UK / 2200));
GameTextForPlayer (i, string, 850.3);
************SavePlayerPos [i] [LastX] = x;
************SavePlayerPos [i] [Lasty] = y;
************SavePlayerPos [i] [LastZ] = z;
}
if (Vehicle Details [GetPlayerVehicleID (i)] [gas] == 0 && messaged [i] == 0 && Filling [i] == 0)
{
format (carmess, sizeof (carmess), "Your% s's Fuel HAS dropped to 0% and it was TOWED away. Enjoy the walk!", Vehicle info [GetPlayerVehicleID (i)] [name]);
Send Message Client (in, COLOR_BRIGHTRED, carmess);
messaged [i] = 1;
Vehicle Information [GetPlayerVehicleID (I)] [gas] = 100;
SetVehicleToRespawn (GetPlayerVehicleID (i));
SetTimer ("reset message", 7000.0);
return 1;
}
if (GetPlayerMoney (i) <= 2 && Filling [i] == 1) {
Filling [i] = 0;
Send Message Client (i, COLOR_BRIGHTRED, "You do not have the Sufficient money to continue filling your vehicle!");
return 1;
}
}
***}
**return 1;
*}
-----------------------------------------------------------------------------------------------------------------------------------
they are so that I want to change my speedometer and fuel text from
image 1 to image 2 if possible, hope someone can help me with it.
-----------------------------------------------------------------------------------------------------------------------------------
This is the script from image 1
Public CheckGas ()
*{
**new string [256];
**for (new i = 0; i <MAX_PLAYERS; i ++)
***{
******if (IsPlayerConnected (in) && IsPlayerInAnyVehicle (in))
*******{
**********if (speedo [i] == 1 && aMessage [i] == 0 && Count [i] == 0 && bizmsg [i] == 0)
{
new Float: x, Float: y, Float: z;
************new Float: distance, value;
************New filename [256];
************format (filename, sizeof (filename), "% d", GetPlayerVehicleID (i));
************GetPlayerPos (i, x, y, z);
************distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePla yerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
************value = floatround (distance * 11000);
************format (string, sizeof (string), "~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ y ~ Speed: ~ w ~% d ~ r ~ ~ n ~~ y ~ Fuel: ~ w ~% d / 100, "floatround (value / 2200), Vehicle info [GetPlayerVehicleID (i)] [gas]);
GameTextForPlayer (i, string, 850.3);
************SavePlayerPos [i] [LastX] = x;
************SavePlayerPos [i] [Lasty] = y;
************SavePlayerPos [i] [LastZ] = z;
}
if (speedo [i] == 2 && aMessage [i] == 0 && Count [i] == 0)
{
new Float: x, Float: y, Float: z;
************new Float: distance, value;
************New filename [256];
************format (filename, sizeof (filename), "% d", GetPlayerVehicleID (i));
************GetPlayerPos (i, x, y, z);
************distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePla yerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
************value = floatround (distance * 11000);
************format (string, sizeof (string), "~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ n ~~ y ~ Speed: ~ w ~% d ~ r ~ ~ n ~~ y ~ Fuel: ~ w ~ N / A ", floatround (UK / 2200));
GameTextForPlayer (i, string, 850.3);
************SavePlayerPos [i] [LastX] = x;
************SavePlayerPos [i] [Lasty] = y;
************SavePlayerPos [i] [LastZ] = z;
}
if (Vehicle Details [GetPlayerVehicleID (i)] [gas] == 0 && messaged [i] == 0 && Filling [i] == 0)
{
format (carmess, sizeof (carmess), "Your% s's Fuel HAS dropped to 0% and it was TOWED away. Enjoy the walk!", Vehicle info [GetPlayerVehicleID (i)] [name]);
Send Message Client (in, COLOR_BRIGHTRED, carmess);
messaged [i] = 1;
Vehicle Information [GetPlayerVehicleID (I)] [gas] = 100;
SetVehicleToRespawn (GetPlayerVehicleID (i));
SetTimer ("reset message", 7000.0);
return 1;
}
if (GetPlayerMoney (i) <= 2 && Filling [i] == 1) {
Filling [i] = 0;
Send Message Client (i, COLOR_BRIGHTRED, "You do not have the Sufficient money to continue filling your vehicle!");
return 1;
}
}
***}
**return 1;
*}
-----------------------------------------------------------------------------------------------------------------------------------