Jump to content

[FS]Controlul masinii [0.3c]


Speederx

Recommended Posts

BootBonnet1.png

Controlul masinii

---------------------------------------

Instalare:

1.Luati fisierele .amx .pwn de la download

2.Puneti fisierele in folderul filterscripts

3.Intrati in server.cfg

4.Scrieti la filterscripts YosVehCtrl

---------------------------------------

Comenzi:

/masina

10760095.png

[img width=500 height=309]http://img814.imageshack.us/img814/4963/controls.png

Aceasta contine:

1.Pornirea/inchiderea motorului.

motorfs.png

2.Aprinderea/inchiderea luminilor.

lightk.png

3.Aprinderea/inchiderea alarmei.

alarma.png

[img width=500 height=164]http://img404.imageshack.us/img404/8674/alarma2.png

4.Blocarea/descuierea usilor masinii.

usi.png

5.Deschiderea/inchiderea capotei.

capota1.png

capota.png

6.Deschiderea/inchiderea porbagajului.

porbagaj.png

[img width=500 height=220]http://img341.imageshack.us/img341/9685/porbagaj2.png

7.Schimbarea nr placutei de la masina.

placacm.png

PlatePro2.png

---------------------------------------

Download:

http://solidfiles.com/d/76cc/

---------------------------------------

IMPORTANT:

Acest FS este doar tradus de mine,totul ii apartine lui Yoshi de pe sa-mp.com !

Link to comment
Share on other sites

yo am inteles k nu e facut de tn dar puteai macar sa repari erorile din el dak tot lai tradus

are 20 erori

C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(82) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(83) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(88) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(89) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(101) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(102) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(107) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(108) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(120) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(121) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(126) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(127) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(156) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(157) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(162) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(163) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(175) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(176) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(181) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(182) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "alarm"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "bonnet"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "boot"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "doors"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "engine"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "lights"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "objective"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


20 Errors.

Link to comment
Share on other sites

yo am inteles k nu e facut de tn dar puteai macar sa repari erorile din el dak tot lai tradus

are 20 erori

C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(82) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(83) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(88) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(89) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(101) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(102) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(107) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(108) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(120) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(121) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(126) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(127) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(156) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(157) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(162) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(163) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(175) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(176) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(181) : error 017: undefined symbol "GetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(182) : error 017: undefined symbol "SetVehicleParamsEx"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "alarm"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "bonnet"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "boot"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "doors"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "engine"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "lights"
C:\DOCUME~1\Admin\Desktop\CONTRO~1\YOSVEH~1.PWN(240) : warning 203: symbol is never used: "objective"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


20 Errors.

Compileaza-l tu cu Pawno din 0.3c

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Salut ! Am codul acesta ... functioneaza bine , dar cand tin apasat pe D sau A semnalizeaza din faruri  :o

#include <a_samp>
#define BLINK_RATE  500 // This is the rate of flash (also rate of timer in milliseconds)
#define LIGHT_KEY   KEY_SUBMISSION // Set this to whatever key you want to turn the lights on
//Put MAX PLAYERS HERE (sorry its for the timer..)
#undef MAX_PLAYERS
 #define MAX_PLAYERS 50

// Macro from SAMP wiki Credits to the author
#define PRESSED(%0) \
 (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new BlinkTime[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
 KillTimer(BlinkTime[playerid]);
 return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
 if(newstate == PLAYER_STATE_DRIVER)
 {
  new panels, doors, lights, tires;
  GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
  lights = encode_lights(1, 1, 1, 1);
  SetPVarInt(playerid, "vMainOn", 0);
  UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
  BlinkTime[playerid] = SetTimerEx("vBlinker", BLINK_RATE, 1, "i", playerid);
 }
 else if(newstate == PLAYER_STATE_ONFOOT)
 {
  KillTimer(BlinkTime[playerid]);
 }
 return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
 if(PRESSED(LIGHT_KEY))
 {
   new panels, doors, lights, tires;
  GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
  switch(GetPVarInt(playerid, "vMainOn"))
  {
      case 0:
   {
          lights = encode_lights(0, 0, 0, 0);
         SetPVarInt(playerid, "vMainOn", 1);
   }
   case 1:
   {
    lights = encode_lights(1, 1, 1, 1);
    SetPVarInt(playerid, "vMainOn", 0);
   }
  }
  UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
 }
 return 1;
}
forward vBlinker(playerid);
public vBlinker(playerid)
{
 if(IsPlayerInAnyVehicle(playerid))
 {
     new Keys, ud, lr, panels, doors, lights, tires;
     GetPlayerKeys(playerid, Keys, ud, lr);
  GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
     if(lr > 0)
  {
   switch(GetPVarInt(playerid, "vMainOn")){
       case 0:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(1, 1, 0, 0);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(1, 1, 1, 1);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
    case 1:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(0, 0, 1, 1);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(0, 0, 0, 0);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
   }
  }
  else if(lr < 0)
  {
   switch(GetPVarInt(playerid, "vMainOn")){
       case 0:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(0, 0, 1, 1);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(1, 1, 1, 1);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
    case 1:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(1, 1, 0, 0);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(0, 0, 0, 0);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
   }
  }else if(lr == 0)
  {
      switch(GetPVarInt(playerid, "vMainOn")){
          case 0:{
           lights = encode_lights(1, 1, 1, 1);
    }
    case 1:{
                    lights = encode_lights(0, 0, 0, 0);
    }
      }
  }
  UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
 }
 return 1;
}
// Thanks to JernejL (RedShirt)
encode_lights(light1, light2, light3, light4) {
 return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}

Ce trebuie sa scot din cod sa nu mai semnalizeze de loc si sa se aprinda luminile si ziua ?

Multumesc !

Link to comment
Share on other sites

Salut ! Am codul acesta ... functioneaza bine , dar cand tin apasat pe D sau A semnalizeaza din faruri  :o

#include <a_samp>
#define BLINK_RATE  500 // This is the rate of flash (also rate of timer in milliseconds)
#define LIGHT_KEY   KEY_SUBMISSION // Set this to whatever key you want to turn the lights on
//Put MAX PLAYERS HERE (sorry its for the timer..)
#undef MAX_PLAYERS
 #define MAX_PLAYERS 50

// Macro from SAMP wiki Credits to the author
#define PRESSED(%0) \
 (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
new BlinkTime[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
 KillTimer(BlinkTime[playerid]);
 return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
 if(newstate == PLAYER_STATE_DRIVER)
 {
  new panels, doors, lights, tires;
  GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
  lights = encode_lights(1, 1, 1, 1);
  SetPVarInt(playerid, "vMainOn", 0);
  UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
  BlinkTime[playerid] = SetTimerEx("vBlinker", BLINK_RATE, 1, "i", playerid);
 }
 else if(newstate == PLAYER_STATE_ONFOOT)
 {
  KillTimer(BlinkTime[playerid]);
 }
 return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
 if(PRESSED(LIGHT_KEY))
 {
   new panels, doors, lights, tires;
  GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
  switch(GetPVarInt(playerid, "vMainOn"))
  {
      case 0:
   {
          lights = encode_lights(0, 0, 0, 0);
         SetPVarInt(playerid, "vMainOn", 1);
   }
   case 1:
   {
    lights = encode_lights(1, 1, 1, 1);
    SetPVarInt(playerid, "vMainOn", 0);
   }
  }
  UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
 }
 return 1;
}
forward vBlinker(playerid);
public vBlinker(playerid)
{
 if(IsPlayerInAnyVehicle(playerid))
 {
     new Keys, ud, lr, panels, doors, lights, tires;
     GetPlayerKeys(playerid, Keys, ud, lr);
  GetVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
     if(lr > 0)
  {
   switch(GetPVarInt(playerid, "vMainOn")){
       case 0:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(1, 1, 0, 0);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(1, 1, 1, 1);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
    case 1:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(0, 0, 1, 1);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(0, 0, 0, 0);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
   }
  }
  else if(lr < 0)
  {
   switch(GetPVarInt(playerid, "vMainOn")){
       case 0:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(0, 0, 1, 1);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(1, 1, 1, 1);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
    case 1:{
          switch(GetPVarInt(playerid, "vBlinkOn")){
              case 0:{
             lights = encode_lights(1, 1, 0, 0);
            SetPVarInt(playerid, "vBlinkOn", 1);
              }
              case 1:{
       lights = encode_lights(0, 0, 0, 0);
       SetPVarInt(playerid, "vBlinkOn", 0);
              }
     }
    }
   }
  }else if(lr == 0)
  {
      switch(GetPVarInt(playerid, "vMainOn")){
          case 0:{
           lights = encode_lights(1, 1, 1, 1);
    }
    case 1:{
                    lights = encode_lights(0, 0, 0, 0);
    }
      }
  }
  UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), panels, doors, lights, tires);
 }
 return 1;
}
// Thanks to JernejL (RedShirt)
encode_lights(light1, light2, light3, light4) {
 return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}

Ce trebuie sa scot din cod sa nu mai semnalizeze de loc si sa se aprinda luminile si ziua ?

Multumesc !

Va rog !!  :-[

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.