06.02.2012, 18:29
Quote:
mm, y que tendria que poner?? esque no tengo mucha idea, este es el codigo
si alguien me dijese com oponerlo para que no funcionase ese comando en las bicis |
pawn Код:
Nomotor(playerid, vehiculoid)
{
new Coches[48] =
{
506,//aca pones la id de la bici
507,//aca pones la id de la bici
509//aca pones la id de la bici
}
vehiculoid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehiculoid))
{
for(new i = 0; i < 48; i++)
{
if(GetVehicleModel(vehiculoid) == Coches[i])
{
return 1;
}
}
}
return 0;
}
pawn Код:
if (strcmp("/encendermotor", cmd, true) == 0)
{
if(Nomotor(playerid,GetPlayerVehicleID(playerid)))
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
//ARRANCAR /ENCENDERMOTOR
new newcar = GetPlayerVehicle(playerid);
return EncenderMotor(playerid,newcar);
} return SendClientMessage(playerid, 0xFF0000FF, "Tu vehiculo no requiere motor!");
}
if (strcmp("/apagarmotor", cmd, true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
//APAGAR /APAGARMOTOR
if(Nomotor(playerid,GetPlayerVehicleID(playerid)))
{
new newcar = GetPlayerVehicle(playerid);
return ApagarMotor(playerid,newcar);
} return SendClientMessage(playerid, 0xFF0000FF, "Tu vehiculo no requiere motor!");
}