[FilterScript] Easy Weapon By [xB]Lordz
#10

Quote:
Originally Posted by MP2
Посмотреть сообщение
It's good if players want to quickly spawn a weapon without having to open a dialog then browse through, though /weapon [weapon name/id] would be better.
pawn Код:
if(strcmp(cmd, "/weapon", true) == 0)
{
    new choose[256];
    choose = strtok(cmdtext, idx);
    if(!strlen(choose)) {
        SendClientMessage(playerid, COLOR_WHITE, "[USAGE:] /weapon [weapon id/weapon name]");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "|_______ Weapons _______|");
        SendClientMessage(playerid, COLOR_GRAD1, "| AK47(30) - $5,000, MP5 - $3,500");
        return 1;
    }
    if(strcmp(choose,"AK47",true) == 0 || (strcmp(choose,"30",true) == 0) && GetPlayerMoney(playerid)>=50000)
        GivePlayerMoney(playerid, - 5000);
        SendClientMessage(playerid,COLOR_WHITE,"[{33CCFF}INFO{FFFFFF}]: You have bought an AK-47.");
    }
    blablabla....just continue it.
    else
    {
        SendClientMessage(playerid,COLOR_GRAD2,"[{660000}ERROR{FFFFFF}]: Not enough money or invalid weapon!");
        return 1;
    }
    return 1;
}
Just continue it and stuff.

OFFT: Small question, how can I make this :
pawn Код:
if(strcmp(choose,"AK47",true) == 0
Check aswell another thing, for example it's ID(example :
pawn Код:
if(strcmp(choose,"AK47",true) == 0 && (strcmp(choose,"30",true) == 0
Thanks.

EDIT: I understood how, it's
pawn Код:
if(strcmp(choose,"AK47",true) == 0 || (strcmp(choose,"30",true) == 0)
Reply


Messages In This Thread
Easy Weapon By [xB]Lordz - by Lordzy - 20.03.2012, 21:42
Re: Easy Weapon By [xB]Lordz - by .Skool_. - 20.03.2012, 21:47
Re: Easy Weapon By [xB]Lordz - by Lordzy - 21.03.2012, 03:12
Re: Easy Weapon By [xB]Lordz - by petrolhead - 21.03.2012, 05:56
Re: Easy Weapon By [xB]Lordz - by Blunt - 21.03.2012, 11:27
Re: Easy Weapon By [xB]Lordz - by [RB]Akshay - 28.03.2012, 20:44
Re: Easy Weapon By [xB]Lordz - by DokerJr - 28.03.2012, 22:29
Re: Easy Weapon By [xB]Lordz - by Sami Ham - 29.03.2012, 05:00
Re: Easy Weapon By [xB]Lordz - by MP2 - 29.03.2012, 05:03
Re: Easy Weapon By [xB]Lordz - by The__ - 29.03.2012, 07:46

Forum Jump:


Users browsing this thread: 1 Guest(s)