03.03.2012, 06:36
This wouldn't work
An easy way is to load npcidle.amx for your bot, then add this in your gamemode:
That should do the trick, also make sure you load npcidle.amx for your bot, or else it won't do any animations.
An easy way is to load npcidle.amx for your bot, then add this in your gamemode:
pawn Код:
new NPCid = INVALID_PLAYERID;
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid))
{
NPCid = playerid;
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/npccrossarms", cmdtext, true) == 0) {
if(NPCid == INVALID_PLAYERID)
{
return SendClientMessage(playerid, -1, "NPC is not connected!");
}
else
{
ApplyAnimation(NPCid, "DEALER", "DEALER_IDLE", 4.0, 0, 1, 1, 1, -1); // Arms crossed 2
SendClientMessage(playerid, -1, "Command sent to NPC");
return 1;
}
}