PDA

View Full Version : Bot Question.


Injectio73
06/05/2012, 01:31 PM
Heelllooo

I want to change the ID of my Bot.
But i heard i need to make Blank Bots and kick them.
But how i do this?!

sleepysnowflake
06/05/2012, 01:32 PM
Question: Why would you change its ID? Maybe there is an other way ...

Injectio73
06/05/2012, 01:33 PM
Because it has ID 0 ... but i would like to change it to ... 500^^

Other Way? ...

Injectio73
06/05/2012, 03:15 PM
Help PLease

Kyle
06/05/2012, 04:13 PM
You can't it's sa-mp default.

Injectio73
06/05/2012, 04:30 PM
I can!! I Read that i can make Blank Bots. And then i can kick them (automatictly). So my Bot has ID 10 or something else

TzAkS.
06/05/2012, 04:55 PM
Edited

Jonny5
06/05/2012, 05:00 PM
You need to create another vehicle instead of that boat and you will do it like this

AddStaticVehicle(........);//this is the first vehicle,your boat and you will change it with another vehicle
// another cars
AddStaticVehicle(...);//here you need to put your boat after last line with addstaticvehicle or createvehicle

If you don`t change the first line with AddStaticVehicle all cars will be confused with 1 ID.

WHAT?????????
he said BOT not BOAT




Because it has ID 0 ... but i would like to change it to ... 500^^

Other Way? ...


this does not explain WHY you would need todo this, your gonna introduce a ton of
code just to change the ID of a bot?

Not sure if you can connect a bot outside of OnGameModeInit()
but if you can you could probably kick him when a player connected and then re add him,
but if player 10 is joining and player 2 leaves before your bot connects he will get ID 2

its not easy todo and I dont see WHY one would need todo this.

TzAkS.
06/05/2012, 05:10 PM
Lol,didn`t read that :))


for(new i; i < 30; i++)
{
new string[16];
format(string,sizeof(string),"Bot%d",i);
ConnectNPC(string,"npcidle");
}
ConnectNPC("NPC","NPC");
for(new i; i < 30; i++)
{
Kick(i);
}

Jonny5
06/05/2012, 05:12 PM
now that code WILL work!
And is a better way than what my twisted mind thought up!


ill be bookmarking this for pasting to others that want the same.

Injectio73
06/05/2012, 05:29 PM
Lol,didn`t read that :))


for(new i; i < 30; i++)
{
new string[16];
format(string,sizeof(string),"Bot%d",i);
ConnectNPC(string,"npcidle");
}
ConnectNPC("NPC","NPC");
for(new i; i < 30; i++)
{
Kick(i);
}


How does it Work? What i must doing?

TzAkS.
06/05/2012, 05:39 PM
Put that to OnGameModeInit and to this line ConnectNPC("NPC","NPC"); write your npc

Injectio73
06/05/2012, 05:42 PM
Put that to OnGameModeInit and to this line ConnectNPC("NPC","NPC"); write your npc

Doesn't work for me.

Injectio73
07/05/2012, 12:58 PM
Doesn't work for me.

Help