[HELP]bot 2 just stands there and does not drive in his vehicle -
braduz - 20.01.2010
#include <a_samp>
#include <a_npc>
#include <attacking_npc>
new Random;
new patriot;
public OnGameModeInit()
{
// NPCS
ConnectNPC("bot1","striper1");
ConnectNPC("bot2","striper2");
patriot = AddStaticVehicle(470,1248.8331,-806.1240,83.9407,179.9658,115,115); // bot car
return 1;
}
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 0; // We only deal with NPC players in this script
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"bot1",true)) {
SetPlayerSkin(playerid,165);
SetPlayerColor(playerid, 0xAA3333AA);
ShowPlayerMarkers(30);
}
else if(!strcmp(playername,"bot2",true)) {
PutPlayerInVehicle(playerid, patriot, 0);
SetPlayerSkin(playerid,165);
SetPlayerColor(playerid, 0xAA3333AA);
ShowPlayerMarkers(30);
}
return 1;
}
// SetPlayerSkin(playerid,165);
// SetPlayerColor(playerid, 0xAA3333AA);
need some help
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
actiwe - 20.01.2010
try
Код:
if(!strcmp(playername,"bot2",true)) {
instead
Код:
else if(!strcmp(playername,"bot2",true)) {
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
braduz - 20.01.2010
Quote:
|
Originally Posted by actiwe
try
Код:
if(!strcmp(playername,"bot2",true)) {
instead
Код:
else if(!strcmp(playername,"bot2",true)) {
|
dident work
but thanks for trying =/
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
boelie - 20.01.2010
hmmm... can you show us the 'npc script' ?
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
braduz - 20.01.2010
Quote:
|
Originally Posted by boelie
hmmm... can you show us the 'npc script' ?
|
#define RECORDING "patpat" //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
//save this to npcmodes folder in your SA-MP server's folder, and compile it.
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
actiwe - 20.01.2010
Does skin changes and etc work ?
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
braduz - 20.01.2010
Quote:
|
Originally Posted by actiwe
Does skin changes and etc work ?
|
Yeh
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
boelie - 20.01.2010
did you put your recording in the correct folder ?
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
braduz - 20.01.2010
Quote:
|
Originally Posted by boelie
did you put your recording in the correct folder ?
|
yeh
Re: [HELP]bot 2 just stands there and does not drive in his vehicle -
boelie - 20.01.2010
mmhh weird :S it must be something under onplayerspawn then, cause my npc's are always staying out there vehicle if something happend to onplayerspawn in my gamemode.