07.06.2011, 21:40
Hello!
How do i add a standing bot in a GM?
How do i add a standing bot in a GM?
Have you followed the tutorial properly ?
I would suggest you start again or retrace your steps because there's nothing wrong with the tutorial. It work's perfectly. |
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
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, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid,put_the_skin_ID_here);
}
return 1;
}
//Other stuff for normal players goes here!
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, "crusing", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid,0);//CJ skin
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}