Szerző Téma: Npc  (Megtekintve 432 alkalommal)

Nem elérhető Cappsy

  • Adminisztrátor
  • 2754
    • Profil megtekintése
Npc
« Dátum: 2012. Május 17. - 19:51:46 »
+1 Show voters
Sziasztok itt egy enpc ami szarakszik:
EZ igaziból Lustáé csak beleraktam az enyémet ez én recordomat:[A kocsit átírtam stb:
 
#include <a_samp>
new npcveh1;
new Text3D:label1[MAX_PLAYERS];
 
public OnFilterScriptInit()
{
    ConnectNPC(\"[Hybrid_nfsrendor]\", \"nfs\");
   
    npcveh1 = CreateVehicle (437,-1216.7559,2655.1028,46.8677,17.1416,0,0,-1);
     return 1;
}
public OnFilterScriptExit()
{
DestroyVehicle(npcveh1);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid)
{
Delete3DTextLabel(label1[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if (!strcmp(npcname, \"[Hybrid_nfsrendor]\", true))
        {
           PutPlayerInVehicle(playerid, npcveh1, 0);
            SetPlayerSkin(playerid, 281);
           label1[playerid] = Create3DTextLabel(\"[Hybrid_Nfs/Rendõr]\", 0xf20000AA, 30.0, 40.0, 50.0, 40.0, 0);
          Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.7);
        }
        return 1;
     }
     return 1;
}

]
Ez az fs itt a nevet meghagytam csak a kocsit tettem be a record nevet hagytam úgy ahogy volt...[eredeti kocsi:AddStaticVehicle(437,-1216.7559,2655.1028,46.8677,17.1416,0,0); // ]
Ami a Npcmodesbe van:
 
#define RECORDING \"nfsrendor\" 
#define RECORDING_TYPE 1
#include <a_npc>
public OnRecordingPlaybackEnd ( )
{
  StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
  return 0;
}
#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle ( vehicleid, seatid )
  {
    StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
    return 0;
  }
  public OnNPCExitVehicle ( )
  {
    StopRecordingPlayback ( );
    return 0;
  }
#endif

 
az npc jó feljön de nem vezet minden a helyén problem?

Nem elérhető Cappsy

  • Adminisztrátor
  • 2754
    • Profil megtekintése
Npc
« Válasz #1 Dátum: 2012. Május 17. - 19:51:46 »
0 Show voters
Sziasztok itt egy enpc ami szarakszik:
EZ igaziból Lustáé csak beleraktam az enyémet ez én recordomat:[A kocsit átírtam stb:
 
#include <a_samp>
new npcveh1;
new Text3D:label1[MAX_PLAYERS];
 
public OnFilterScriptInit()
{
    ConnectNPC(\"[Hybrid_nfsrendor]\", \"nfs\");
   
    npcveh1 = CreateVehicle (437,-1216.7559,2655.1028,46.8677,17.1416,0,0,-1);
     return 1;
}
public OnFilterScriptExit()
{
DestroyVehicle(npcveh1);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid)
{
Delete3DTextLabel(label1[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if (!strcmp(npcname, \"[Hybrid_nfsrendor]\", true))
        {
           PutPlayerInVehicle(playerid, npcveh1, 0);
            SetPlayerSkin(playerid, 281);
           label1[playerid] = Create3DTextLabel(\"[Hybrid_Nfs/Rendõr]\", 0xf20000AA, 30.0, 40.0, 50.0, 40.0, 0);
          Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.7);
        }
        return 1;
     }
     return 1;
}

]
Ez az fs itt a nevet meghagytam csak a kocsit tettem be a record nevet hagytam úgy ahogy volt...[eredeti kocsi:AddStaticVehicle(437,-1216.7559,2655.1028,46.8677,17.1416,0,0); // ]
Ami a Npcmodesbe van:
 
#define RECORDING \"nfsrendor\" 
#define RECORDING_TYPE 1
#include <a_npc>
public OnRecordingPlaybackEnd ( )
{
  StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
  return 0;
}
#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle ( vehicleid, seatid )
  {
    StartRecordingPlayback ( RECORDING_TYPE, RECORDING );
    return 0;
  }
  public OnNPCExitVehicle ( )
  {
    StopRecordingPlayback ( );
    return 0;
  }
#endif

 
az npc jó feljön de nem vezet minden a helyén problem?

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal