PARTNERI:
-UPOZORENJE-

Samo registrovani članovi mogu da vide/koriste forum u celini.
Prijavite se ili registrujte nalog na Balkan SA-MP forumu.


Autor Tema: [POMOC] Paljenje vozila  (Pročitano 75 puta)

0 članova i 1 gost pregledaju ovu temu.

Van mreže branac_rocky

[POMOC] Paljenje vozila
« poslato: Novembar 18, 2014, 23:08:50 posle podne »
Skripta koju koristim: CityLights RP
Detaljan opis problema: Kad kliknem 2 Ig neće da upali auto..Ne znam do čega je..String sam pokušavao povećati,nije do njega...
Dio skripte:
Citat
  if(newkeys & KEY_SUBMISSION)
   {
      if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
      {
         new engine, lights, alarm, doors, bonnet, boot, objective, string[100];
         GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
         if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid)))) return 1;
         if(engine == 0 || engine == -1)
         {
            new Float:HP;
            GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
            if(HP < 400.0) return SCM(playerid,-1, ""SIVA"Vozilo vam je previse osteceno, pozovite mehanicara!");
            if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid,-1, ""SIVA"Nemate goriva u vozilu pa ne mozete upaliti motor!");
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
            format(string,sizeof(string), "* %s pali motor na vozilu.", GetName(playerid));
            ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
               format(string, sizeof(string), "~g~o");
               PlayerTextDrawSetString(playerid, BRZINOMER[4][playerid], string);
         }
         else if(engine == 1)
         {
            SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
            format(string,sizeof(string), "* %s gasi motor na vozilu.", GetName(playerid));
            ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
            format(string, sizeof(string), "~r~o");
               PlayerTextDrawSetString(playerid, BRZINOMER[4][playerid], string);
         }
      }
   }
Neke slike/video za lakse dobivanje pomoci(neobavezno):
 

Van mreže // xunder

Odg: [POMOC] Paljenje vozila
« Odgovor #1 poslato: Novembar 19, 2014, 12:18:35 posle podne »
Taj tvoj kod je kod kao kod svakog UP-a znaci lupam     if(newkeys & KEY_SUBMISSION)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine, lights, alarm, doors, bonnet, boot, objective, string[100];
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid)))) return 1;
if(engine == 0 || engine == -1)
{
new Float:HP;
GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
if(HP < 400.0) return SCM(playerid,-1, "SCM za 'Vozilo osteceno'");
if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid,-1, "Nemas goriva");
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
format(string,sizeof(string), "* %s pali motor", GetName(playerid));
ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
    format(string, sizeof(string), "~g~o");
    PlayerTextDrawSetString(playerid, BRZINOMER[4][playerid], string);
}
else if(engine == 1)
{
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
format(string,sizeof(string), "* %s gasi motor", GetName(playerid));
ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
format(string, sizeof(string), "~r~o");
    PlayerTextDrawSetString(playerid, BRZINOMER[4][playerid], string);
}
}
}
i ne bi trebalo da ti stvara probleme... Mozda ti je do taste... Mozda ti ne radi broj 2 na tasti. Probaj ovo postaviti na neki drugi key npr kao KEY_WALK da ti se pali pa probaj :)
 

Van mreže branac_rocky

Odg: [POMOC] Paljenje vozila
« Odgovor #2 poslato: Novembar 19, 2014, 13:19:59 posle podne »
nije do tastature :) ...
 

Van mreže [BS]SimkE

  • Transformer
  • *
  • Poruke: 239
  • Pol: Muškarac
    • Different Village
Odg: [POMOC] Paljenje vozila
« Odgovor #3 poslato: Novembar 19, 2014, 13:22:01 posle podne »
Ako ti menjanje tastature nije pomoglo, probaj da stavis ovako (sa returnom) :D if(newkeys & KEY_SUBMISSION)
{
  if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  {
     new engine, lights, alarm, doors, bonnet, boot, objective, string[100];
     GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
     if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid)))) return 1;
     if(engine == 0)
     {
        new Float:HP;
        GetVehicleHealth(GetPlayerVehicleID(playerid), HP);
        if(HP < 400.0) return SCM(playerid,-1, ""SIVA"Vozilo vam je previse osteceno, pozovite mehanicara!");
        if(Fuel[GetPlayerVehicleID(playerid)] <= 0) return SCM(playerid,-1, ""SIVA"Nemate goriva u vozilu pa ne mozete upaliti motor!");
            SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
        format(string,sizeof(string), "* %s pali motor na vozilu.", GetName(playerid));
        ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
           format(string, sizeof(string), "~g~o");
           PlayerTextDrawSetString(playerid, BRZINOMER[4][playerid], string);
     }
     else if(engine == 1)
     {
        SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, 0, alarm, doors, bonnet, boot, objective);
        format(string,sizeof(string), "* %s gasi motor na vozilu.", GetName(playerid));
        ProxDetector(20.0, playerid, string, PROX,PROX,PROX,PROX,PROX);
        format(string, sizeof(string), "~r~o");
          PlayerTextDrawSetString(playerid, BRZINOMER[4][playerid], string);
     }
  }
  return 1;
}
« Poslednja izmena: Novembar 19, 2014, 13:22:28 posle podne [BS]SimkE »
 

Van mreže branac_rocky

Odg: [POMOC] Paljenje vozila
« Odgovor #4 poslato: Novembar 19, 2014, 14:06:00 posle podne »
popravio sam ovo tako sto sam stavio za paljenje na vrh ondialogresponse...
Radilo mi je dok nisam napravio novi sistem i on se pokreće "krugom" na misu..
if(newkeys & KEY_LOOK_BEHIND)
Pa me zanima je li do toga ili može biti nešto drugo?