Hey gente estoy intentando hacer un comando para poder reparar los vehiculos, pero me lanza un error en el float y no se como arreglarlo, alguien me dice que debo hacer?
Код:
command(repararveh, playerid, params[])
{
new id, string[128], vehid;
if(sscanf(params, "ud", id, vehid))
{
if(Player[playerid][AdminLevel] >= 3)
{
SendClientMessage(playerid, WHITE, "USAR: /repararveh [jugadorid][casilla (1-3)]");
}
}
else
{
if(Player[playerid][AdminLevel] >= 3)
{
switch(vehid)
{
case 1:
{
new veh = GetPlayerVehicleID(id), float:health;
GetVehicleHealth(veh, health);
if(health < 1000)
{
RepairVehicle(GetPlayerVehicleID(id));
format(string, sizeof(string), "Has reparado el vehiculo de %s", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "%s ha reparado tu vehiculo", GetName(playerid));
SendClientMessage(playerid, WHITE, string);
}
else
{
SendClientMessage(playerid, WHITE, "Este vehiculo no necesita reparaciуn");
}
}
case 2:
{
new veh = GetPlayerVehicleID(id), float:health;
GetVehicleHealth(veh, health);
if(health < 1000)
{
RepairVehicle(GetPlayerVehicleID(id));
format(string, sizeof(string), "Has reparado el vehiculo de %s", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "%s ha reparado tu vehiculo", GetName(playerid));
SendClientMessage(playerid, WHITE, string);
}
else
{
SendClientMessage(playerid, WHITE, "Este vehiculo no necesita reparaciуn");
}
}
case 3:
{
new veh = GetPlayerVehicleID(id), float:health;
GetVehicleHealth(veh, health);
if(health < 1000)
{
RepairVehicle(GetPlayerVehicleID(id));
format(string, sizeof(string), "Has reparado el vehiculo de %s", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "%s ha reparado tu vehiculo", GetName(playerid));
SendClientMessage(playerid, WHITE, string);
}
else
{
SendClientMessage(playerid, WHITE, "Este vehiculo no necesita reparaciуn");
}
}
default:
{
SendClientMessage(playerid, WHITE, "Las unicas casillas disponibles del vehiculo son de 1-3");
}
}
}
}
return 1;
}
pon la letra inicial de la etiqueta en mayъscula, cambia "float:" por "Float:"