NPC HELP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC HELP (
/showthread.php?tid=145067)
NPC HELP -
w00tNew - 30.04.2010
well i read the tut by KC but my problem is everything is fine i recorded it fine but the only thing is my NPC does not go in the vehicle heres my code
on my GM
Код:
new gg; //Global variable!
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Under Contruction DC");
ConnectNPC("TokyoKing","gg");
gg = CreateVehicle(562, -2480.9185,-614.1309,132.5537,261.2576,3,3,3);
on my NPCmodes folder
Код:
#define RECORDING "gg" //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);
#if RECORDING_TYPE == 1
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
Re: NPC HELP -
w00tNew - 30.04.2010
ANY HELPPPPPPPPPPPPPP
Re: NPC HELP -
boelie - 30.04.2010
make addstaticvehicle not createvehicle
and this you dont need ;
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
You need the OnplayerSpawn stuff for npc in the normal gamemode or Filterscript
Re: NPC HELP -
CAR - 30.04.2010
Put this in your GameMode
pawn Код:
public OnPlayerConnect(playerid)
{
new Pname[24];
if(IsPlayerNPC(playerid))
{
GetPlayerName(playerid, Pname, sizeof(Pname));
if(!strcmp(Pname, "TokyoKing", true)) return PutPlayerInVehicle(playerid, gg, 0); // dunno exactly driver seat but thought it was 0
}
return 1;
}
Re: NPC HELP -
w00tNew - 30.04.2010
thxs
Re: NPC HELP -
w00tNew - 30.04.2010
what but i get this error i cant figure it out

srry
Код:
error 017: undefined symbol "gg"
Re: NPC HELP -
w00tNew - 30.04.2010
nvm srry i fixed it
XD