Szerző Téma: NPC busz RP szerverre  (Megtekintve 2155 alkalommal)

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Dátum: 2012. január 28. - 09:48:03 »
0 Show voters
SZiasztok!
Van nekem egy NPC szkriptem:
Itt több NPC is van de nekem csak az elsõ kéne
[pawn]#include <a_samp>
new npcveh1;
new npcveh2;
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      ConnectNPC(\"Busz2\",\"asd2nemkell\");
   ConnectNPC(\"Busz3\",\"asd3nemkell\");
      ConnectNPC(\"Busz4\",\"asd4nemkell\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
     //npcveh2 = CreateVehicle(437,0,0,0,0,0,2);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
            return 1;
        }
        if(!strcmp(npcname, \"Busz2\", true)) //a 2. NPC
        {
            PutPlayerInVehicle(playerid, 256, 0);
            return 1;
        }
        if(!strcmp(npcname, \"Busz3\", true)) //a 3. NPC
        {
            PutPlayerInVehicle(playerid, 260, 0);
            return 1;
        }
        if(!strcmp(npcname, \"Busz4\", true)) //a 4. NPC
        {
            PutPlayerInVehicle(playerid, 259, 0);
            return 1;
        }
        return 1;
    }
return 0;
    }[/pawn]
Ezzel azt kéne csinálni, hogy azt kéne megoldani, hogyha elõtte van egy player, akkor megáll 15mp-re,de ha a 15 mp alatt eltünik a player elõle akkor elindul de ha nem tünik el akkor átmegy rajta :D
Illetve Üres jármû elõtt ugyanez de csak 10 mp-re.
ÉS az kéne hogy a busz felé kéne egy szöveg:
Los Santos 1-es helyi járat
Következõ megálló:
És ott a következõ megállót kéne kiirnia:
Megállók(sorrendben) és kordinátái:
Buszpályaudvar(1048.6243,-918.4476,42.7974)
Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)
Nyilván arra gondolok, hogyha Buszpályaudvarhoz ér akkor a felette lévõ szöveg váltson át Kórház-ra
Itt van az npcmodes mappában lévõ cucc:
[pawn]#define RECORDING \"LSBusz1\" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid)
{
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
}
public OnNPCExitVehicle() StopRecordingPlayback();[/pawn]

Nem elérhető Sramm

  • 596
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #1 Dátum: 2012. január 28. - 10:14:50 »
0 Show voters
Minden kész, csak az kell, hogy megálljon... Türelmet

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #2 Dátum: 2012. január 28. - 10:21:52 »
0 Show voters
Idézetet írta: Sramm date=1327742090\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16179\" data-ipsquote-contentclass=\"forums_Topic
Minden kész, csak az kell, hogy megálljon... Türelmet
 
Rendben köszi!
Menne a +
de nekem nem adja a ki a pipákat vagy miket nem tom mik mert még nem láttam :S

Nem elérhető Sramm

  • 596
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #3 Dátum: 2012. január 28. - 11:35:15 »
0 Show voters
[pawn]#include <a_samp>
new npcveh1;
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
             af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Buszpályaudvar\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
             Attach3DTextLabelToPlayer(af[playerid], playerid, 0.0, 0.0, 0.5);
            return 1;
        }
        return 1;
    }
   
public OnPlayerUpdate(playerid)
{
/*Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)*/
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1048.6243,-918.4476,42.7974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kórház\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1361.5592,-1289.0697,13.5808))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Fegyverbolt\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1873.1134,-1468.3119,13.5164))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Skate Park\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1929.8151,-1749.7991,13.5161))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\nDéli benzinkút\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1818.4257,-1902.7332,13.5276))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Közlekedési vállalat\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1957.9391,-2142.9128,13.5759))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Úttisztító telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2841.6777,-1911.7682,11.1206))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Bank\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2661.4673,-1851.6005,11.0974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Stadion\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2235.8147,-1728.5891,13.5170))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Edzõterem\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1393.0193,-1811.3241,13.5459))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n LS Rendõrkapitányság\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1301.3805,-1392.3341,13.4179))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Paintball\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,945.5659,-1237.4039,16.5680))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kamionos telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   }
   return 1;
   }
[/pawn]

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #4 Dátum: 2012. január 28. - 11:38:17 »
0 Show voters
Idézetet írta: Sramm date=1327746915\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16179\" data-ipsquote-contentclass=\"forums_Topic
[pawn]#include <a_samp>
new npcveh1;
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
             af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Buszpályaudvar\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
             Attach3DTextLabelToPlayer(af[playerid], playerid, 0.0, 0.0, 0.5);
            return 1;
        }
        return 1;
    }
   
public OnPlayerUpdate(playerid)
{
/*Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)*/
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1048.6243,-918.4476,42.7974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kórház\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1361.5592,-1289.0697,13.5808))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Fegyverbolt\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1873.1134,-1468.3119,13.5164))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Skate Park\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1929.8151,-1749.7991,13.5161))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\nDéli benzinkút\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1818.4257,-1902.7332,13.5276))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Közlekedési vállalat\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1957.9391,-2142.9128,13.5759))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Úttisztító telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2841.6777,-1911.7682,11.1206))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Bank\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2661.4673,-1851.6005,11.0974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Stadion\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2235.8147,-1728.5891,13.5170))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Edzõterem\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1393.0193,-1811.3241,13.5459))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n LS Rendõrkapitányság\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1301.3805,-1392.3341,13.4179))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Paintball\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,945.5659,-1237.4039,16.5680))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kamionos telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   }
   return 1;
   }
[/pawn]
 

D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(9) : warning 217: loose indentation
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(9) : warning 202: number of arguments does not match definition
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(10) : warning 217: loose indentation
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(17) : warning 217: loose indentation
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(34) : warning 217: loose indentation
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(47) : warning 217: loose indentation
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(47) : error 017: undefined symbol \"af\"
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(47) : warning 215: expression has no effect
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(47) : error 001: expected token: \";\", but found \"]\"
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(47) : error 029: invalid expression, assumed zero
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(47) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
4 Errors.
« Utoljára szerkesztve: 2012. január 28. - 11:41:42 írta Wiliam Levy »

Gang[St]e[R]

  • Vendég
NPC busz RP szerverre
« Válasz #5 Dátum: 2012. január 28. - 14:02:24 »
0 Show voters
Már egyböl kiszúrtam egy hibát, összerakom neked a scriptet, de legkésöbb csak vasárnap tudom, mert nem vagyok otthon.

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #6 Dátum: 2012. január 28. - 14:14:19 »
0 Show voters
[pawn]#include <a_samp>
new npcveh1;
new PlayerText3D:af[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
             af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Buszpályaudvar\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
             Attach3DTextLabelToPlayer(af[playerid], playerid, 0.0, 0.0, 0.5);
            return 1;
        }
        return 1;
    }
public OnPlayerUpdate(playerid)
{
/*Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)*/
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1048.6243,-918.4476,42.7974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kórház\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1361.5592,-1289.0697,13.5808))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Fegyverbolt\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1873.1134,-1468.3119,13.5164))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Skate Park\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1929.8151,-1749.7991,13.5161))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\nDéli benzinkút\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1818.4257,-1902.7332,13.5276))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Közlekedési vállalat\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1957.9391,-2142.9128,13.5759))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Úttisztító telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2841.6777,-1911.7682,11.1206))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Bank\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2661.4673,-1851.6005,11.0974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Stadion\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2235.8147,-1728.5891,13.5170))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Edzõterem\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1393.0193,-1811.3241,13.5459))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n LS Rendõrkapitányság\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1301.3805,-1392.3341,13.4179))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Paintball\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,945.5659,-1237.4039,16.5680))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kamionos telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   }
   return 1;
   }
   }
   }[/pawn]
És már csak 2 error van:
 
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 029: invalid expression, assumed zero
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 004: function \"OnPlayerUpdate\" is not implemented

 
Nah meg a sok warning de az nem számít

NPC busz RP szerverre
« Válasz #7 Dátum: 2012. január 30. - 20:04:12 »
0 Show voters
ez nekem is kéne

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #8 Dátum: 2012. január 30. - 20:27:54 »
0 Show voters
Idézetet írta: Wiliam Levy date=1327756459\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16179\" data-ipsquote-contentclass=\"forums_Topic
[pawn]#include <a_samp>
new npcveh1;
new PlayerText3D:af[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
             af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Buszpályaudvar\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
             Attach3DTextLabelToPlayer(af[playerid], playerid, 0.0, 0.0, 0.5);
            return 1;
        }
        return 1;
    }
public OnPlayerUpdate(playerid)
{
/*Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)*/
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1048.6243,-918.4476,42.7974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kórház\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1361.5592,-1289.0697,13.5808))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Fegyverbolt\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1873.1134,-1468.3119,13.5164))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Skate Park\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1929.8151,-1749.7991,13.5161))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\nDéli benzinkút\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1818.4257,-1902.7332,13.5276))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Közlekedési vállalat\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1957.9391,-2142.9128,13.5759))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Úttisztító telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2841.6777,-1911.7682,11.1206))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Bank\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2661.4673,-1851.6005,11.0974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Stadion\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2235.8147,-1728.5891,13.5170))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Edzõterem\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1393.0193,-1811.3241,13.5459))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n LS Rendõrkapitányság\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1301.3805,-1392.3341,13.4179))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Paintball\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,945.5659,-1237.4039,16.5680))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kamionos telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   }
   return 1;
   }
   }
   }[/pawn]
És már csak 2 error van:
 
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 029: invalid expression, assumed zero
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 004: function \"OnPlayerUpdate\" is not implemented

 
Nah meg a sok warning de az nem számít
 
Ez már jó megcsináltam tegnapelõtt, mûködik
mostmár csak az npcmodes mappában lévõ npc -nek kéne azt megcsinálni hogy megálljon 20mp-re
eddig ezt tákoltam össze szombaton nem erroros de nem jó
Üdv van egy npc-m az npcmodes mappában:
 
#define RECORDING \"LSBusz1\" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
new timer;
forward NPCtimer( playerid );
public NPCTimer( playerid )
{
ResumeRecordingPlayback();
}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid)
{
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
if(IsPlayerInRangeOfPoint(1201.9932,-1278.8666,13.5145))
{
PauseRecordingPlayback();
SendChat(\"Megérkeztünk Los Santos Kórház megállóhoz.\");
SendChat(\"Következõ megálló: Fegyverbolt!\");
SetTimer(\"NPCtimer\",20000,0,\"i\");
}
}
public OnNPCExitVehicle() StopRecordingPlayback();

 

Dupla hozzászólás automatikusan összefûzve. ( 2012. január 30. - 20:29:19 )


ez nekem is kéne
 
[/quote]
Minek? :)
Ha kész lesz és jó kisfiú leszel átküldöm :P

NPC busz RP szerverre
« Válasz #9 Dátum: 2012. január 30. - 20:35:10 »
0 Show voters
Idézetet írta: Wiliam Levy date=1327951674\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16179\" data-ipsquote-contentclass=\"forums_Topic


[pawn]#include <a_samp>
new npcveh1;
new PlayerText3D:af[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
             af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Buszpályaudvar\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
             Attach3DTextLabelToPlayer(af[playerid], playerid, 0.0, 0.0, 0.5);
            return 1;
        }
        return 1;
    }
public OnPlayerUpdate(playerid)
{
/*Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)*/
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1048.6243,-918.4476,42.7974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kórház\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1361.5592,-1289.0697,13.5808))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Fegyverbolt\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1873.1134,-1468.3119,13.5164))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Skate Park\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1929.8151,-1749.7991,13.5161))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\nDéli benzinkút\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1818.4257,-1902.7332,13.5276))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Közlekedési vállalat\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1957.9391,-2142.9128,13.5759))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Úttisztító telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2841.6777,-1911.7682,11.1206))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Bank\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2661.4673,-1851.6005,11.0974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Stadion\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2235.8147,-1728.5891,13.5170))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Edzõterem\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1393.0193,-1811.3241,13.5459))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n LS Rendõrkapitányság\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1301.3805,-1392.3341,13.4179))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Paintball\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,945.5659,-1237.4039,16.5680))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kamionos telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   }
   return 1;
   }
   }
   }[/pawn]
És már csak 2 error van:
 
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 029: invalid expression, assumed zero
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 004: function \"OnPlayerUpdate\" is not implemented

 
Nah meg a sok warning de az nem számít
 
Ez már jó megcsináltam tegnapelõtt, mûködik
mostmár csak az npcmodes mappában lévõ npc -nek kéne azt megcsinálni hogy megálljon 20mp-re
eddig ezt tákoltam össze szombaton nem erroros de nem jó
Üdv van egy npc-m az npcmodes mappában:
 
#define RECORDING \"LSBusz1\" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
new timer;
forward NPCtimer( playerid );
public NPCTimer( playerid )
{
ResumeRecordingPlayback();
}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid)
{
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
if(IsPlayerInRangeOfPoint(1201.9932,-1278.8666,13.5145))
{
PauseRecordingPlayback();
SendChat(\"Megérkeztünk Los Santos Kórház megállóhoz.\");
SendChat(\"Következõ megálló: Fegyverbolt!\");
SetTimer(\"NPCtimer\",20000,0,\"i\");
}
}
public OnNPCExitVehicle() StopRecordingPlayback();

 

Dupla hozzászólás automatikusan összefûzve. ( 2012. január 30. - 20:29:19 )


ez nekem is kéne
 
[/quote]
Minek? :)
Ha kész lesz és jó kisfiú leszel átküldöm :P
 
[/quote]
Akkor majd nekem is átküldöd?*-*

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #10 Dátum: 2012. január 30. - 20:36:53 »
0 Show voters
Idézetet írta: legendaryboy date=1327952110\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16179\" data-ipsquote-contentclass=\"forums_Topic


 

[pawn]#include <a_samp>
new npcveh1;
new PlayerText3D:af[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
      ConnectNPC(\"Busz1\",\"LSBusz1\");
      npcveh1 = CreateVehicle(437,0,0,0,0,0,1);
        return 1;
}
public OnFilterScriptInit()
{
        print(\"NPC SCRIPT BE\");
CreateObject(1257,1366.58032227,-1285.99255371,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
CreateObject(1257,1874.79345703,-1474.88562012,13.82323360,0.00000000,0.00000000,270.00000000); //object(bustopm) (2)
CreateObject(1257,1926.87011719,-1744.08789062,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (3)
CreateObject(1257,1813.09985352,-1903.34948730,13.84993362,0.00000000,0.00000000,180.00000000); //object(bustopm) (4)
CreateObject(1257,1953.27514648,-2144.47900391,13.82606697,0.00000000,0.00000000,180.00000000); //object(bustopm) (5)
CreateObject(1257,2845.76879883,-1909.36523438,11.38081455,0.00000000,0.00000000,0.00000000); //object(bustopm) (6)
CreateObject(1257,2664.21166992,-1849.07653809,11.29911137,0.00000000,0.00000000,34.00000000); //object(bustopm) (7)
CreateObject(1257,2235.56494141,-1724.05444336,13.83062267,0.00000000,0.00000000,90.00000000); //object(bustopm) (8)
CreateObject(1257,1397.47216797,-1811.26806641,13.82606697,0.00000000,0.00000000,0.00000000); //object(bustopm) (9)
CreateObject(1257,1303.05395508,-1387.99560547,13.77805805,0.00000000,0.00000000,90.00000000); //object(bustopm) (10)
CreateObject(1257,950.23364258,-1234.38195801,17.01278496,0.00000000,0.00000000,0.00000000); //object(bustopm) (11)
CreateObject(1257,1033.52514648,-924.08306885,42.58720016,0.00000000,0.00000000,276.00000000); //object(bustopm) (12)
CreateObject(1257,1039.84326172,-923.39239502,42.72784424,0.00000000,0.00000000,276.00000000); //object(bustopm) (13)
CreateObject(1257,1045.65576172,-922.55346680,42.86410141,0.00000000,0.00000000,276.00000000); //object(bustopm) (14)
CreateObject(1257,1051.88732910,-921.86755371,43.00956726,0.00000000,0.00000000,276.00000000); //object(bustopm) (15)
CreateObject(1257,1203.88769531,-1273.26257324,13.82606697,0.00000000,0.00000000,90.00000000); //object(bustopm) (16)
        return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
            PutPlayerInVehicle(playerid, npcveh1, 0);
             af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Buszpályaudvar\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
             Attach3DTextLabelToPlayer(af[playerid], playerid, 0.0, 0.0, 0.5);
            return 1;
        }
        return 1;
    }
public OnPlayerUpdate(playerid)
{
/*Kórház(1203.1002,-1277.4969,13.5041)
Fegyverbolt(1361.5592,-1289.0697,13.5808)
Skate Park(1873.1134,-1468.3119,13.5164)
Déli Benzinkút(1929.8151,-1749.7991,13.5161)
Közlekedési vállalat(1818.4257,-1902.7332,13.5276)
Úttisztító telep(1957.9391,-2142.9128,13.5759)
Bank(2841.6777,-1911.7682,11.1206)
Stadion(2661.4673,-1851.6005,11.0974)
Edzõterem(2235.8147,-1728.5891,13.5170)
Los Santos Rendõrkapitányság(1393.0193,-1811.3241,13.5459)
Paintball(1301.3805,-1392.3341,13.4179)
Kamionos telep(945.5659,-1237.4039,16.5680)*/
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, \"Busz1\", true))
        {
        if(IsPlayerInRangeOfPoint(playerid,3.0,1048.6243,-918.4476,42.7974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kórház\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1361.5592,-1289.0697,13.5808))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Fegyverbolt\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1873.1134,-1468.3119,13.5164))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Skate Park\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1929.8151,-1749.7991,13.5161))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\nDéli benzinkút\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1818.4257,-1902.7332,13.5276))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Közlekedési vállalat\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1957.9391,-2142.9128,13.5759))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Úttisztító telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2841.6777,-1911.7682,11.1206))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Bank\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2661.4673,-1851.6005,11.0974))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Stadion\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,2235.8147,-1728.5891,13.5170))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Edzõterem\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1393.0193,-1811.3241,13.5459))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n LS Rendõrkapitányság\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,1301.3805,-1392.3341,13.4179))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Paintball\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   if(IsPlayerInRangeOfPoint(playerid,3.0,945.5659,-1237.4039,16.5680))
        {
        Delete3DTextLabel(af[playerid]);
        af[playerid] = Create3DTextLabel(\"Köv. Megálló: \\n Kamionos telep\", 0xFF0000FF, 0.0, 0.0, 0.0, 20, 0, 1);
   }
   }
   return 1;
   }
   }
   }[/pawn]
És már csak 2 error van:
 
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 029: invalid expression, assumed zero
D:\\Rockstar Games\\CryRPG\\filterscripts\\npck.pwn(56) : error 004: function \"OnPlayerUpdate\" is not implemented

 
Nah meg a sok warning de az nem számít
 
Ez már jó megcsináltam tegnapelõtt, mûködik
mostmár csak az npcmodes mappában lévõ npc -nek kéne azt megcsinálni hogy megálljon 20mp-re
eddig ezt tákoltam össze szombaton nem erroros de nem jó
Üdv van egy npc-m az npcmodes mappában:
 
#define RECORDING \"LSBusz1\" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
new timer;
forward NPCtimer( playerid );
public NPCTimer( playerid )
{
ResumeRecordingPlayback();
}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid)
{
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
if(IsPlayerInRangeOfPoint(1201.9932,-1278.8666,13.5145))
{
PauseRecordingPlayback();
SendChat(\"Megérkeztünk Los Santos Kórház megállóhoz.\");
SendChat(\"Következõ megálló: Fegyverbolt!\");
SetTimer(\"NPCtimer\",20000,0,\"i\");
}
}
public OnNPCExitVehicle() StopRecordingPlayback();

 

Dupla hozzászólás automatikusan összefûzve. ( 2012. január 30. - 20:29:19 )


ez nekem is kéne
 
[/quote]
Minek? :)
Ha kész lesz és jó kisfiú leszel átküldöm :P
 
[/quote]
Akkor majd nekem is átküldöd?*-*
 
[/quote]
Ha jó kis fiú (vagy lány :P) leszel :P

NPC busz RP szerverre
« Válasz #11 Dátum: 2012. január 31. - 18:08:39 »
0 Show voters
Nekem is elküldöd ha megkérhetlek?:))

Nem elérhető Wiliam Levy

  • 594
  • Wiliam Levy
    • Profil megtekintése
NPC busz RP szerverre
« Válasz #12 Dátum: 2012. január 31. - 20:26:25 »
0 Show voters
Idézetet írta: Ricsi66 date=1328029719\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"16179\" data-ipsquote-contentclass=\"forums_Topic
Nekem is elküldöd ha megkérhetlek?:))
 
ilyen hozzászólásokra nem vagyok kiváncsi...
Ha kész akkor úgyis kirakom,hogy másoknak ne kelljen bajlódniuk ezzel!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal