17.09.2010, 15:50
I used the tutorial about NPCs by kc, yes... But here's the problem...
I recorded one with name "Line_1" (with /vrecord). I did and compiled the file to npcmodes, then I added to my gamemode these stuff:
Then
Later...
Then...
That's all. My problem is here, the NPC doesn't appear. It only says in samp-server.exe:
The number of slots doesn't change from 125 to 124, when I come in-game, it doesn't appear.
Help?
I recorded one with name "Line_1" (with /vrecord). I did and compiled the file to npcmodes, then I added to my gamemode these stuff:
Код:
new Line1;
Код:
public OnPlayerRequestSpawn(playerid) { if(IsPlayerNPC(playerid)) return 1; return 1; }
Код:
public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC. { new npcname[MAX_PLAYER_NAME]; GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name. if(!strcmp(npcname, "Line_1", true)) //Checking if the NPC's name is MyFirstNPC { PutPlayerInVehicle(playerid, Line1, 0); //Putting the NPC into the vehicle we created for it. } return 1; } //My stuff here :) return 1; }
Код:
public OnGameModeInit() { ConnectNPC("Line_1","Line_1"); Line1 = CreateVehicle(431, 0.0, 0.0, 5.0, 0.0, -1, -1, 999999999);
Код:
Incoming connection: 127.0.0.1:1748
Help?