23.10.2009, 11:08
This is the code:
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, "mynpc", true)) //Checking if the NPC's name is mynpc
{
PutPlayerInVehicle(playerid, Bus, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
return 1;
}
return 1;
}
Error:error 017: undefined symbol "IsPlayerNPC"
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, "mynpc", true)) //Checking if the NPC's name is mynpc
{
PutPlayerInVehicle(playerid, Bus, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
return 1;
}
return 1;
}
Error:error 017: undefined symbol "IsPlayerNPC"