SA-MP Forums Archive
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=126876)



NPC help - ScottCFR - 10.02.2010

Ok, Edit so i don't have to make a new post....
for some reason when someone joins my serverit doesn't say it anymore

So i added this into my gamemode but it don't work. Can someone fix it?


Код:
OnPlayerConnect(playerid)
SendClientMessageToAll(COLOR_GREY,"%s Has Joined The Server");

OnPlayerDisconnect(playerid)
SendClientMessageToAll(COLOR_GREY,"%s Has Left The Server");



Re: NPC help - MadeMan - 10.02.2010

pawn Код:
#include <a_samp>
#define RECORDING "Bus"
#Define RECORDING_TYPE 1
Change it to

pawn Код:
#define RECORDING "Bus"
#define RECORDING_TYPE 1
delete #include <a_samp>

Define > define


Re: NPC help - ScottCFR - 10.02.2010

Down to 7
Код:
(10) : error 017: undefined symbol "Bus"
(13) : error 010: invalid function or declaration
(13) : error 017: undefined symbol "Bus"
(20) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
(23) : error 017: undefined symbol "ConnectNPC"
(23) : error 017: undefined symbol "mynpc"
(23) : error 029: invalid expression, assumed zero
(23) : fatal error 107: too many error messages on one line



Re: NPC help - Ricop522 - 10.02.2010

Quote:
Originally Posted by ScottCFR
Down to 7
Код:
(10) : error 017: undefined symbol "Bus"
(13) : error 010: invalid function or declaration
(13) : error 017: undefined symbol "Bus"
(20) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
(23) : error 017: undefined symbol "ConnectNPC"
(23) : error 017: undefined symbol "mynpc"
(23) : error 029: invalid expression, assumed zero
(23) : fatal error 107: too many error messages on one line
Put you ongamemodeinit in fs gamemode...


Re: NPC help - ScottCFR - 10.02.2010

IDK lol


Re: NPC help - ScottCFR - 10.02.2010

Код:
Bump
Sorry i told some people i would have it today



Re: NPC help - actiwe - 10.02.2010

Well...
pawn Код:
#define RECORDING "Bus"
#define RECORDING_TYPE 1

main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
    public OnNPCEnterVehicle(437, 1) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
    public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
This is NPC script. This MUST be under the npcmode(amx ofcourse).

Other stuff goes under your gamemode script. You connect and put it to vehicle under gamemodeinit. If you don't get me read tutorial twice.





Re: NPC help - ScottCFR - 10.02.2010

ok i reread the tutorial but i still don't get it


Re: NPC help - actiwe - 10.02.2010

NPC script is standalone..It doesn't need any a_samp or somthing. Just take that script that i posted to you and compile it. Put it under ncpmodes also.

Now in your GameMode script, you must connect this Bus NPC to server and put them to the bus. You have all the dirty work in first post just need to move snippets.



Re: NPC help - V1ceC1ty - 10.02.2010

Instead of #include <a_samp> it must be #include <a_npc>.