08.10.2010, 00:32
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;
Also, try using x_nr. I can give you a tutorial if you'd like.