28.10.2010, 03:09
I noticed that you were "returning 1" when it wasn't necessary. I would replace your "OnPlayerSpawn" with this:
Just make sure that in your 'server.cfg' file, you have identified that you have NPC's in your server. Simply change this line:
Obviously replacing 0 with however many NPC's you have.
pawn Код:
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, "rhino", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, rhinodriver, 0); //Putting the NPC into the vehicle we created for it.
}
}
return 1;
}
Код:
maxnpc 0