How do I set a BOT's skin and give him a weapon? -
Epic Shower - 08.02.2010
Hello.
I got all my bots working now but, after looking up how to give my bots a weapon or change hes skin i didn't find anything.
Could anyone please show me how it's done?
Thanks.
P.S - If there's already a post about this i'm sorry.I haven't fully checked the forums.
Re: How do I set a BOT's skin and give him a weapon? -
Grim_ - 08.02.2010
Read the tutorial on how to create an NPC. It's simple to figure out, just read carefully.
Re: How do I set a BOT's skin and give him a weapon? -
Epic Shower - 08.02.2010
Wait...so I need to create a new variable?
ex:
new botweapon;
new botskin;
botweapon = GivePlayerWeapon(playerid, 1, 1000);
botskin = Setplayerskin(playerid, 162);
Then use it on the playerspawn?
If i'm wrong can you please tell me where in the tutorial is that thanks.
Re: How do I set a BOT's skin and give him a weapon? -
Rzzr - 08.02.2010
you don't need the new botweapon and new botskin.
Just the:
pawn Код:
GivePlayerWeapon(playerid, 1, 1000);
Setplayerskin(playerid, 162);
Re: How do I set a BOT's skin and give him a weapon? -
David_Omid - 08.02.2010
Yeah, just place those lines anywhere which is called in the NPC script
So, let's say you put the lines which give the bot a weapon under the callback for when it's spawned, it will just give it to them
Another alternative is that your bot script somehow calls a function in another script which gives whichever playerid that calls it the weapon
Re: How do I set a BOT's skin and give him a weapon? -
Grim_ - 08.02.2010
Something like
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsNPC(playerid))
{
GivePlayerWeapon(playerid, XX, XX);
SetPlayerSkin(playerid, XX);
}
return 1;
}
Re: How do I set a BOT's skin and give him a weapon? -
Epic Shower - 08.02.2010
I Have made it to set the bots skin but i'm still having problems with the guns.
I placed the giveweapon code in the bots it compiles and runs in server.
Sorry to ask all this questions but,
Are they supposed to appear with the weapon holded?
Or not?
If its not supposed to appear how do i make them hold the weapon?
I've seen it in a server.
Re: How do I set a BOT's skin and give him a weapon? -
Epic Shower - 08.02.2010
Ok guy i was wrong about the Weapons it works.
I think it only doesnt work with a chainsaw