Szerző Téma: Index  (Megtekintve 618 alkalommal)

Index
« Dátum: 2012. október 04. - 17:18:01 »
0 Show voters
Sziasztok légyszi segítsetek ebbe mert ne értem mi a hiba....Elõre is köszi :)
 

#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;
}

 
És az errorok 2:
 

C:\\Documents and Settings\\Dyr Oss\\Asztal\\index.pwn(75) : error 017: undefined symbol \"AttachObjectToVehicle\"
C:\\Documents and Settings\\Dyr Oss\\Asztal\\index.pwn(77) : error 017: undefined symbol \"AttachObjectToVehicle\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
2 Errors.
« Utoljára szerkesztve: 2012. október 04. - 17:20:00 írta DarkRobe »

Bence98

  • Vendég
Index
« Válasz #1 Dátum: 2012. október 04. - 17:19:30 »
0 Show voters
Ugyanezt beraktam saját pawnoba és nem írt errort :DD

Index
« Válasz #2 Dátum: 2012. október 04. - 17:20:22 »
0 Show voters
az LOL

Dupla hozzászólás automatikusan összefûzve. ( 2012. október 04. - 17:21:26 )

Valaki ötlet?

Index
« Válasz #3 Dátum: 2012. október 04. - 17:23:01 »
0 Show voters
Idézetet írta: Bence98 date=1349363970\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28245\" data-ipsquote-contentclass=\"forums_Topic
Ugyanezt beraktam saját pawnoba és nem írt errort :DD
 
Azért nem írt neked errort mert neked az includéid megfelelnek.
Az a_samp vagy a_player includéd nem jó hozzá.De lehet, hogy nem ezekkel van a baj.Próbáld meg. :)

Index
« Válasz #4 Dátum: 2012. október 04. - 17:33:08 »
0 Show voters
okés megpróbálom

Nem elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Index
« Válasz #5 Dátum: 2012. október 04. - 17:35:10 »
+1 Show voters
frissítsd az includeokat...sa-mp.com-ról leszeded a windows szervert és abban benne vannak...
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal