[help]NPCBot
#1

Look I can not make the npc in the car
here you have the script
pawn Код:
#include <a_samp>
new IDBot,string1[128],string2[128],string3[128],string4[128],string5[128];
new Guard;
#if defined FILTERSCRIPT
#define VERDE2  0x00D900C8


public OnFilterScriptInit()
{
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" ");
    print(" ");
    print(" ");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    ConnectNPC("Bar_Man ", "barman");
    ConnectNPC("Guarda","Policeman");
    SetTimer("ChatBot",1000*60*5,true);
    Guard = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 7, 1, 5000); //
}

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new npcname[64];
        GetPlayerName(playerid,npcname,64);
        if(!strcmp(npcname,"Bar_Man ",true)) {
            SetPlayerSkin(playerid, 254);
            ResetPlayerWeapons(playerid);
            IDBot=playerid;
            return 1;
        }
        if(!strcmp(npcname,"Guarda ",true)){
            SetPlayerSkin(playerid, 290);
      PutPlayerInVehicle(playerid, Guard, 0);
            }
        return 1;
        }
    return 0;
}
Reply
#2

Код:
#include <a_samp>
new IDBot,string1[128],string2[128],string3[128],string4[128],string5[128];
new Guard;
#if defined FILTERSCRIPT
#define VERDE2  0x00D900C8


public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" ");
print(" ");
print(" ");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
ConnectNPC("Bar_Man ", "barman");
ConnectNPC("Guarda","Policeman");
SetTimer("ChatBot",1000*60*5,true);
Guard = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 7, 1, 5000); //
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[64];
GetPlayerName(playerid,npcname,64);
if(!strcmp(npcname,"Bar_Man ",true)) {
SetPlayerSkin(playerid, 254);
ResetPlayerWeapons(playerid);
IDBot=playerid;
return 1;
}
if(!strcmp(npcname,"Guarda ",true)){
SetPlayerSkin(playerid, 290);
      PutPlayerInVehicle(playerid, Guard, 0);
}
return 1;
}
return 0;
}
<<<< OLD

Код:
#include <a_samp>
new IDBot,string1[128],string2[128],string3[128],string4[128],string5[128];
new Guard;
#if defined FILTERSCRIPT
#define VERDE2  0x00D900C8


public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" ");
print(" ");
print(" ");
print("----------------------------------\n");
}

#endif

#define VERDE2  0x00D900C8

public OnGameModeInit()
{
ConnectNPC("Bar_Man ", "barman");
ConnectNPC("Guarda","Policeman");
SetTimer("ChatBot",1000*60*5,true);
Guard = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 7, 1, 5000); //
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[64];
GetPlayerName(playerid,npcname,64);
if(!strcmp(npcname,"Bar_Man ",true)) {
SetPlayerSkin(playerid, 254);
ResetPlayerWeapons(playerid);
IDBot=playerid;
return 1;
}
if(!strcmp(npcname,"Guarda ",true)){
SetPlayerSkin(playerid, 290);
      PutPlayerInVehicle(playerid, Guard, 0);
}
return 1;
}
return 0;
}
<< NEW

I just took a little look at your script, and maybe something changes now but I'm not sure if this'll fix your problem, I didn't really take my time.
Reply
#3

don't working
Reply
#4

please help me
Reply
#5

pawn Код:
#include <a_samp>
#define VERDE2  0x00D900C8

new IDBot,string1[128],string2[128],string3[128],string4[128],string5[128];
new Guard;

public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" ");
print(" ");
print(" ");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
ConnectNPC("Bar_Man ", "barman");
ConnectNPC("Guarda","Policeman");
SetTimer("ChatBot",1000*60*5,true);
Guard = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 7, 1, 5000); //
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[64];
GetPlayerName(playerid,npcname,64);
if(!strcmp(npcname,"Bar_Man ",true)) {
SetPlayerSkin(playerid, 254);
ResetPlayerWeapons(playerid);
IDBot=playerid;
return 1;
}
if(!strcmp(npcname,"Guarda ",true)){
SetPlayerSkin(playerid, 290);
      PutPlayerInVehicle(playerid, Guard, 0);
}
return 1;
}
return 0;
} <<<< OLD


Code:
#include <a_samp>
new IDBot,string1[128],string2[128],string3[128],string4[128],string5[128];
new Guard;
#if defined FILTERSCRIPT
#define VERDE2  0x00D900C8


public OnFilterScriptInit()
{
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" ");
print(" ");
print(" ");
print("----------------------------------\n");
}

#endif

#define VERDE2  0x00D900C8

public OnGameModeInit()
{
ConnectNPC("Bar_Man ", "barman");
ConnectNPC("Guarda","Policeman");
SetTimer("ChatBot",1000*60*5,true);
Guard = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 7, 1, 5000); //
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new npcname[64];
GetPlayerName(playerid,npcname,64);
if(!strcmp(npcname,"Bar_Man ",true)) {
SetPlayerSkin(playerid, 254);
ResetPlayerWeapons(playerid);
IDBot=playerid;
return 1;
}
if(!strcmp(npcname,"Guarda ",true)){
SetPlayerSkin(playerid, 290);
      PutPlayerInVehicle(playerid, Guard, 0);
}
return 1;
}
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)