Szerző Téma: --|ENGINE IF HEALTH ERROR|--  (Megtekintve 370 alkalommal)

--|ENGINE IF HEALTH ERROR|--
« Dátum: 2012. Augusztus 07. - 12:04:31 »
0 Show voters
Valaki meg tudná mondani, hogy ebben mi a hiba?
/motor elindtitja/leállítja ha a jármû élete 400+ ha 400 alatt akkor kiírja, hogy nem indíthatja,
mikor beírom a /motor parancsot semmi sem történik.. :/
 
CMD:motor(playerid, params[]){
    if(IsPlayerInAnyVehicle(playerid))
    {
       new vehid=GetPlayerVehicleID(playerid);
   new engine,lights,alarm,doors,bonnet,boot,objective;
   GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
   new Float:health;
   health = GetVehicleHealth(vehid, health);
   if(health > 400)
   {
   if(engine==0)
   {
   SetVehicleParamsEx(vehid,1,lights,alarm,doors,bonnet,boot,objective);//elindítás
   SendClientMessage(playerid, 0x006000AA ,\"Motor Elindítva!\");
   } else {
   SetVehicleParamsEx(vehid,0,lights,alarm,doors,bonnet,boot,objective);//leállítás
   {
   SendClientMessage(playerid, 0xB40000AA ,\"Motor Leállítva!\");
            }
   }
   if(health <= 400)
            {
   SetVehicleParamsEx(vehid,0,lights,alarm,doors,bonnet,boot,objective);
   SendClientMessage(playerid, Piros, \"A motort nem indíthatod el.\");
   }
   }
}
return 1;
}
« Utoljára szerkesztve: 2012. Augusztus 07. - 16:55:13 írta anorennia »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal