Szerző Téma: Jármű Index  (Megtekintve 2176 alkalommal)

Jármű Index
« Dátum: 2014. december 11. - 21:15:35 »
0 Show voters
Sziasztok!A régi filterscriptek között megtaláltam az Index-et úgyhogy most publikálom!
Erről annyit kell tudni , hogy sok RPG szerveren van!
A használata: Q - E (Q = Bal oldali index, E = Jobb oldali index!)
Néhány kép:\"618581893sa-mp-001_www.kepfeltoltes.hu_.png\"
\"830519670sa-mp-004_www.kepfeltoltes.hu_.png\"
Pawn code:
 
#include <a_samp>
enum index2
{
obj1,
obj2,
bool:indexing
}
#define VEHICLE_NONE 0
#define VEHICLE_CAR 1
#define VEHICLE_BOAT 2
#define VEHICLE_TRAIN 3
#define VEHICLE_HELI 4
#define VEHICLE_PLANE 5
#define VEHICLE_BIKE 6
#define VEHICLE_MONSTERTRUCK 7
#define VEHICLE_QUADBIKE 8
#define VEHICLE_BMX 9
#define VEHICLE_TRAILER 10
new gs_vehicleTypes [] = {
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_MONSTERTRUCK,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_BOAT,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_TRAILER, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_MONSTERTRUCK, VEHICLE_CAR,
    VEHICLE_BOAT, VEHICLE_HELI, VEHICLE_BIKE, VEHICLE_TRAIN, VEHICLE_TRAILER, VEHICLE_CAR, VEHICLE_BOAT,
    VEHICLE_BOAT, VEHICLE_BOAT, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_PLANE,
    VEHICLE_BIKE, VEHICLE_BIKE, VEHICLE_BIKE, VEHICLE_PLANE, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_BIKE, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_QUADBIKE, VEHICLE_BOAT, VEHICLE_BOAT, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_PLANE, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_BMX, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_BOAT, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_BOAT, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_BMX, VEHICLE_BMX, VEHICLE_PLANE, VEHICLE_PLANE, VEHICLE_PLANE,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_PLANE, VEHICLE_PLANE, VEHICLE_BIKE,
    VEHICLE_BIKE, VEHICLE_BIKE, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_TRAIN,
    VEHICLE_TRAIN, VEHICLE_PLANE, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_PLANE,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_MONSTERTRUCK, VEHICLE_MONSTERTRUCK, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_HELI, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_TRAIN, VEHICLE_TRAIN, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_MONSTERTRUCK, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_PLANE, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_BIKE, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_TRAILER, VEHICLE_CAR, VEHICLE_BIKE, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_TRAIN,
    VEHICLE_TRAILER, VEHICLE_PLANE, VEHICLE_PLANE, VEHICLE_CAR, VEHICLE_BOAT, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR, VEHICLE_CAR,
    VEHICLE_TRAILER, VEHICLE_TRAILER, VEHICLE_TRAILER, VEHICLE_CAR, VEHICLE_TRAILER, VEHICLE_TRAILER
};
stock indexcompatible(veh)
{
new model=GetVehicleModel(veh);
/*
new compatible=1;
switch(model)
{
    case 460,476,511,512,513,519,520,553,577,592,593,548,425,417,487,488,497,563,447,469,509,481,510,462,448,581,522,461,521,523,463,586,468,471,435,450,569,570,584,590,591,606,607,608,610,611,485,538,457,532,486,406,530,537,571,572,574,449,525,583,539,441,464,465,501,564,594,472..473,493,595,484,430,452..453,446,454:
    {
        compatible=0;
    }
}
*/
return (gs_vehicleTypes[model-400]==VEHICLE_CAR)?1:0;
}
new index[MAX_VEHICLES][index2];
forward indexf(vehicleid,oldal);
public indexf(vehicleid,oldal)
{
new v=vehicleid;
if(v!=INVALID_VEHICLE_ID)
{
index[v][obj1]=CreateObject(19294,0,0,0,0,0,0);
AttachObjectToVehicle(index[v][obj1],v,(oldal==0)?1:-1, 2.5, -0.2, 0,0,0);
index[v][obj2]=CreateObject(19294,0,0,0,0,0,0);
AttachObjectToVehicle(index[v][obj2],v,(oldal==0)?1:-1, -2.5, -0.2, 0,0,0);
index[v][indexing]=true;
}
return 1;
}
// PRESSED(keys)
#define PRESSED(%0) \\
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
{
    if(PRESSED(KEY_LOOK_LEFT)||PRESSED(KEY_LOOK_RIGHT))
    {
    new veh=GetPlayerVehicleID(playerid);
    if(index[veh][indexing])
    {
        DestroyObject(index[veh][obj1]);
        DestroyObject(index[veh][obj2]);
        index[veh][indexing]=false;
    } else {
        if(indexcompatible(veh))
        {
               new oldal2=(PRESSED(KEY_LOOK_LEFT))?1:0;
               indexf(veh,oldal2);
      }
   }
}
}
return 1;
}

 
Eredeti téma: http://sampforum.hu/index.php?topic=20101
Letöltési link(.PWN): http://www.solidfiles.com/d/e0303f9580/index.pwn
Letöltési link(.AMX): http://www.solidfiles.com/d/522b696a5e/index.amx
Ha valami baj van vele csak szólj!
« Utoljára szerkesztve: 2014. december 12. - 13:04:58 írta ƒlaﻛh »

Nem elérhető Pedró

  • 3341
  • 2014 © Az év Szkriptere
    • Profil megtekintése
Jármű Index
« Válasz #1 Dátum: 2014. december 12. - 06:17:48 »
+1 Show voters

Jármű Index
« Válasz #2 Dátum: 2014. december 12. - 07:23:32 »
0 Show voters
Legalább nem magadénak tűntetted fel.  :thumbsup:

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Jármű Index
« Válasz #3 Dátum: 2014. december 12. - 07:35:39 »
0 Show voters
Idézetet írta: Chrispapa date=1418365412\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"51689\" data-ipsquote-contentclass=\"forums_Topic
Legalább nem magadénak tűntetted fel.  :thumbsup:
 
Én nem látok olyan mondatot amiben azt írja le, hogy ő készítette az egészet.. csak, hogy találta.  :slap:  :hmm:

Nem elérhető divkn

  • 3259
    • Profil megtekintése
Jármű Index
« Válasz #4 Dátum: 2014. december 12. - 08:32:34 »
0 Show voters
Ideje megtanulnod keresni, mert ha így folytatod, akkor én kénytelen leszek figyelmeztetést adni rá, vagy valaki más meg fogja tenni.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal