19.04.2012, 16:53
This is the stock
And i use this at OnPlayerText
but now if i type in chat "bier", nothing happens, only the message show, it should give me beer...
I also get that warning at new bot = GetNearestBot
"tag mismatch"
pawn Код:
stock GetNearestBot(playerid, Float:abstand)
{
new Float:pX, Float:pY, Float:pZ, Float:vX, Float:vZ, Float:vY;
GetPlayerPos(playerid, pX, pY, pZ);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerNPC(i))
{
GetPlayerPos(i, vX, vY, vZ);
if(floatabs(pX-vX) < abstand && floatabs(pY-vY) < abstand && floatabs(pZ-vZ) < abstand && i != playerid)
{
return i;
}
}
}
return 9999;
}
pawn Код:
new bot = GetNearestBot(playerid);
pawn Код:
if(!strcmp(GetName(bot),"MikeTheBarkeeper",true))
{
if(!strcmp(text,"bier",true))
{
BarMenBusy = 1;
PlayerOrder[playerid] = "bier";
SetPlayerChatBubble(bot,"Mike: {FFFFFF}Kleinen Moment bitte...",0xFFFF00DD,35.0,3000);
ApplyAnimation(bot, "BAR","Barserve_bottle", 4.0, 0, 0, 0, 0, 0, 1);
SetTimerEx("GetBottle",3001,false,"ii",bot,playerid);
}
I also get that warning at new bot = GetNearestBot
"tag mismatch"