[Tutorial] Creating a new NPC
#81

Why am i getting


C:\Users\*****\Desktop\sailor2.pwn(13) : error 017: undefined symbol "MyFirstNPCVehicle"
C:\Users\*****\Desktop\sailor2.pwn(73) : error 017: undefined symbol "MyFirstNPCVehicle"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#82

hey, nice tut, but i got so much errors my compiler crashed
Reply
#83

Quote:
Originally Posted by buster_
Посмотреть сообщение
hey, nice tut, but i got so much errors my compiler crashed
Your missing brackets somewhere
Reply
#84

i have one quistion how to set the npc car id and the npc skin id answer faster
Reply
#85

What is the problem?
Код:
[16:53:29] Incoming connection: 127.0.0.1:59481
[16:53:29] [npc:join] Pilot has joined the server (1:127.0.0.1)
[16:53:29] [npc:part] Pilot has left the server (1:2)
[16:53:29] Incoming connection: 127.0.0.1:59480
[16:53:29] [npc:join] NRG has joined the server (0:127.0.0.1)
[16:53:29] [npc:part] NRG has left the server (0:2)
I put in server.cfg maxnpc to 2 but it dosen't work
Reply
#86

Quote:
Originally Posted by Gagi_Corleone
Посмотреть сообщение
What is the problem?
Код:
[16:53:29] Incoming connection: 127.0.0.1:59481
[16:53:29] [npc:join] Pilot has joined the server (1:127.0.0.1)
[16:53:29] [npc:part] Pilot has left the server (1:2)
[16:53:29] Incoming connection: 127.0.0.1:59480
[16:53:29] [npc:join] NRG has joined the server (0:127.0.0.1)
[16:53:29] [npc:part] NRG has left the server (0:2)
I put in server.cfg maxnpc to 2 but it dosen't work
You have antichit ?
and he throw your bot on the game.Read first post for it
Reply
#87

Could anyone help me? I recorded my npc, add mini script and did everythink like it says in the tutorial. But my npc only says incoming connection, and he didnt join. My server isnt passworted. So what i do wrong?
Reply
#88

Please, help me!
Reply
#89

you need to change the maxnpc count in server.cfg
Reply
#90

Thanks, bro!
Reply
#91

I use the SA-MP 0.3c R2 Windows Server. But i canґt use the Commands.
Here the Video
[ame]http://www.youtube.com/watch?v=lLRp_gk3te8[/ame]

Pls Help me
Reply
#92

Help please I have two npc's but only one joins and goes into their vehicle.
This is the code
Code:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
	{
		if(strcmp(PlayerName(playerid), "[BOT]Dave") == 0)
		{
		    PutPlayerInVehicle(playerid,NPCBike,0);
		    SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
		    SetPlayerSkin(playerid,50);
		    IsSpawned[playerid] =1;
		    print("[NPC SPAWN] Dave as been added.");
		}
		return 1;
	}
    if(IsPlayerNPC(playerid))
	{
		if(strcmp(PlayerName(playerid), "[BOT]Billy") == 0)
		{
		    PutPlayerInVehicle(playerid,NPCTram,0);
		    SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
		    SetPlayerSkin(playerid,255);
		    IsSpawned[playerid] =1;
		    print("[NPC SPAWN] Billy has been placed in his tram.");
		}
		return 1;
	}
Please help me.
Reply
#93

Hey
I have a problem with NPC. Well, i made my file with name soldier and i connect my npc, he's connecting everything okey, but he is standing in spawn point. Is this possible that my file is too big? Help me please
Reply
#94

Someone, please help me!
Reply
#95

Nice tutorial. Any question: How i can set the skin of my bot? I have 8 bot and all 8 in vehicle and all are with skin of CJ xD. How i can set another skin in these bots? Thanks!
Reply
#96

SetPlayerSkin....
Reply
#97

Thanks System64
Reply
#98

Quote:
Originally Posted by Macros50
View Post
Thanks System64
or you can change your skin and the npc will be with that skin (it is on my server anyway)

ex:if i am cj when i record the npc will be cj
Reply
#99

Guys, if you follow the tutorial, the NPC will work, it works on my server...
Reply

Quote:
Originally Posted by jat1801
View Post
Help please I have two npc's but only one joins and goes into their vehicle.
This is the code
Code:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
	{
		if(strcmp(PlayerName(playerid), "[BOT]Dave") == 0)
		{
		    PutPlayerInVehicle(playerid,NPCBike,0);
		    SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
		    SetPlayerSkin(playerid,50);
		    IsSpawned[playerid] =1;
		    print("[NPC SPAWN] Dave as been added.");
		}
		return 1;
	}
    if(IsPlayerNPC(playerid))
	{
		if(strcmp(PlayerName(playerid), "[BOT]Billy") == 0)
		{
		    PutPlayerInVehicle(playerid,NPCTram,0);
		    SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
		    SetPlayerSkin(playerid,255);
		    IsSpawned[playerid] =1;
		    print("[NPC SPAWN] Billy has been placed in his tram.");
		}
		return 1;
	}
Please help me.
Try
pawn Code:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        if(strcmp(PlayerName(playerid), "[BOT]Dave") == 0)
        {
            PutPlayerInVehicle(playerid,NPCBike,0);
            SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
            SetPlayerSkin(playerid,50);
            IsSpawned[playerid] =1;
            print("[NPC SPAWN] Dave as been added.");
                    return 1;
        }
        if(strcmp(PlayerName(playerid), "[BOT]Billy") == 0)
        {
            PutPlayerInVehicle(playerid,NPCTram,0);
            SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
            SetPlayerSkin(playerid,255);
            IsSpawned[playerid] =1;
            print("[NPC SPAWN] Billy has been placed in his tram.");
                    return 1;
        }
                return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)