Not working ... (+rep)
#1

This is the stock

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;
}
And i use this at OnPlayerText

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);
            }
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"
Reply


Messages In This Thread
Not working ... (+rep) - by Dripac - 19.04.2012, 16:53
Re: Not working ... (+rep) - by ViniBorn - 19.04.2012, 16:56
Re: Not working ... (+rep) - by Dripac - 19.04.2012, 17:00
Re: Not working ... (+rep) - by MeDaKewlDude - 19.04.2012, 17:08
Re: Not working ... (+rep) - by Dripac - 19.04.2012, 17:11
Re: Not working ... (+rep) - by MeDaKewlDude - 19.04.2012, 17:44
Re: Not working ... (+rep) - by Dripac - 19.04.2012, 17:46

Forum Jump:


Users browsing this thread: 1 Guest(s)