Simple command issue.
#2

pawn Код:
if (strcmp("/hold", cmdtext, true, 10) == 0)
    {
        new tmp[64];
        new idx;
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_LIGHTYELLOW,"[USAGE:] /hold [itemname]");
            return 1;
        }
        if (strcmp("burger", cmdtext, true, 10) == 0)
        {
            SetPlayerHoldingObject(playerid, 2880, 5);
        }
    }
    if (strcmp("/holdhelp", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, COLOR_LIGHTYELLOW, "_______________________________________");
        SendClientMessage(playerid, GREEN, "[FOOD:]");
        SendClientMessage(playerid, COLOR_LIGHTYELLOW, " burger - pizza - burrito - pizzabox - sprunkcup - takeout");
        SendClientMessage(playerid, GREEN, "[ALCOHOL:]");
        SendClientMessage(playerid, COLOR_LIGHTYELLOW, " beer - beer2 - whiskey - wineglass");
        SendClientMessage(playerid, GREEN, "[MISC:]");
        SendClientMessage(playerid, COLOR_LIGHTYELLOW, " briefcase - hairdryer - scythe - record - backpack - boombox - moneybag");
        return 1;
    }
    return 0;
Fixed. If it doesn't work, please specify a problem.

Also, try using x_nr. I can give you a tutorial if you'd like.
Reply


Messages In This Thread
Simple command issue. - by Snyper1 - 08.10.2010, 00:25
Re: Simple command issue. - by TheHoodRat - 08.10.2010, 00:32
Re: Simple command issue. - by Snyper1 - 08.10.2010, 01:24
Re: Simple command issue. - by Snyper1 - 08.10.2010, 01:32
Re: Simple command issue. - by Rachael - 08.10.2010, 01:49
Re: Simple command issue. - by Snyper1 - 08.10.2010, 02:23

Forum Jump:


Users browsing this thread: 1 Guest(s)