{ Problem
#2

You have a problem with your if statement syntax, I recommend reading through the Pawn documentation for more information on its syntax, here is the fixed version:

pawn Код:
if (strcmp("/weapons", cmdtext, true, 10) == 3)
{
    ShowPlayerDialog(playerid, Weapons, DIALOG_STYLE_LIST, "Weapons", "Deagle   Price :2000$ \n Sawn-Off   Price :1200$ \n Uzi   Price :720$ \n M4   :2000$", "Buy", "Cancel");
    return 1;
}

if (strcmp("/admincommands", cmdtext, true, 10) == 4)
{
Additionally I'm not sure what you're trying to achieve with the == 3/4, I assume you're confused there too, also with the setting of the command length to 10 each time, which is not needed at all. So here is what I think you're looking for really:

pawn Код:
if (strcmp("/weapons", cmdtext, true) == 0)
{
    ShowPlayerDialog(playerid, Weapons, DIALOG_STYLE_LIST, "Weapons", "Deagle   Price :2000$ \n Sawn-Off   Price :1200$ \n Uzi   Price :720$ \n M4   :2000$", "Buy", "Cancel");
    return 1;
}

if (strcmp("/admincommands", cmdtext, true) == 0)
{
Reply


Messages In This Thread
{ Problem - by New Ilyass - 01.02.2011, 13:58
Re: { Problem - by JaTochNietDan - 01.02.2011, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)