14.11.2011, 13:30
Hey.. I'm trying to make a command that show your fuel but only you can see how much fuel left and the msg sent to you like a normal msg.. no textdraw..
this is what i got.. but it aint working ;/
command
the part of the fuel show.. its from GF script.. so there are more things above and under..
this is what i got.. but it aint working ;/
command
Код:
if(strcmp(cmd, "/checkfuel", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsPlayerInAnyVehicle(playerid))
{
gGas[playerid] = 1;
format(string, sizeof(string), "* %s looks at his fuel guage.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You need to be in a vehicle for it!");
}
}
return 1;
}
Код:
ew vehicle = GetPlayerVehicleID(i);
if(Gas[vehicle] >= 1)
{
if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
if(gGas[i] == 1) {
format(string, sizeof(string), "Fuel left: %d%",Gas[vehicle]);
SendClientMessage(i, COLOR_LIGHTRED, "string"); }
if(IsAPlane(vehicle) || IsABoat(vehicle)) { Gas[vehicle]++; }
Gas[vehicle]--;
}

