Bot - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bot (
/showthread.php?tid=260214)
Bot -
cruising - 07.06.2011
Hello!
How do i add a standing bot in a GM?
Re: Bot -
Stigg - 07.06.2011
Npc tutorial:
https://sampforum.blast.hk/showthread.php?tid=95034
Re: Bot -
cruising - 07.06.2011
[QUOTE=Stigg;1237793]Npc tutorial:
Thanks! but it doesnt work.
Re: Bot -
Stigg - 07.06.2011
[quote=cruising;1237855]
Quote:
Originally Posted by Stigg
Npc tutorial:
Thanks! but it doesnt work.
|
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.
Re: Bot -
cruising - 08.06.2011
[quote=Stigg;1237860]
Quote:
Originally Posted by cruising
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.
|
The bot join and all is fine, but he doesnt show up at the point i was standing when recorded.
i have tried put if(IsPlayerNPC(playerid)) return 1; on login, spawn,register etc, still no bot.
Re: Bot -
Tee - 08.06.2011
Did you change the type from 1 to 2?
pawn Код:
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
Re: Bot -
cruising - 08.06.2011
Quote:
Originally Posted by Tee
Did you change the type from 1 to 2?
pawn Код:
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
|
No i had not change that, its always something i miss -_-
Thanks!
Re: Bot -
Tee - 08.06.2011
No problem.
Re: Bot -
cruising - 08.06.2011
Quote:
Originally Posted by Tee
No problem.
|
Any way to change skin on him?
Re: Bot -
Tee - 08.06.2011
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, "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;
}
Example:
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, "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;
}