*** Terrible Title Removed
#1

> 5 means 6-∞ ?
and < 1 means 0 or lower?
>= 5 means 5?

Then i need help with one cmd.
like -> /buy 1-5
1 = something
2 = something...
Reply
#2

>5 means 5 or More
<1 means 1 Or Lower
>= 5
Reply
#3

>= 5 means 'greater than or equal to 5'
Reply
#4

How i can make command with 2 different effect like /hi 1 /hi 2 ? I use sscanf and zcmd CMD:hi(playerid,params[])
Reply
#5

Quote:

CMD:hi(playerid, params[])
{
new numb;
{
if(sscanf(params, "i", numb)) return SendClientMessage(playerid, 0x8C8573C8, "/hi [number]");
{
if(numb == 1)
{
SendClientMessage(playerid, COLOR_RED, "/hi 1");
}
if(numb == 2)
{
SendClientMessage(playerid, COLOR_RED, "/hi 2");
}
}
}
return 1;
}

That?
Reply
#6

Quote:
Originally Posted by Anthony ©
Посмотреть сообщение
CMD:hi(playerid, params[])
{
new numb;
{
if(sscanf(params, "i", numb)) return SendClientMessage(playerid, 0x8C8573C8, "/hi [number]");
{
if(numb == 1)
{
SendClientMessage(playerid, COLOR_RED, "/hi 1");
}
if(numb == 2)
{
SendClientMessage(playerid, COLOR_RED, "/hi 2");
}
}
}
return 1;
}
This wrong
pawn Код:
CMD:hi(playerid,params[])
{
    new Number;
    if(sscanf(params,"d",Number)) return SendClientMessage(playerid, -1 "/hi [number]");

    switch(Number)
    {
        case 0: SendClientMessage(playerid, -1 "Number 1");
        case 1: SendClientMessage(playerid, -1 "Number 2");
    }
    return true;
}
Reply
#7

No Anthony. Your codes have a good start, but need some modification.

Код:
CMD:hi(playerid, params[])
{
    new numb;
    if(sscanf(params, "i", numb)) return SendClientMessage(playerid, 0x8C8573C8, "/hi [number]");
    {
        if(numb == 1)
        {
            SendClientMessage(playerid, COLOR_RED, "/hi 1");
        }
        if(numb == 2)
        {
            SendClientMessage(playerid, COLOR_RED, "/hi 2");
        }
    }
    return 1;
}
You can also make it with a switch.

https://sampwiki.blast.hk/wiki/Control_Structures#switch_2

Код:
CMD:hi(playerid, params[])
{
    new numb;
    if(sscanf(params, "i", numb)) return SendClientMessage(playerid, 0x8C8573C8, "/hi [number]");
    {
        switch(numb)
        {
            case 1:
            {
                SendClientMessage(playerid, COLOR_RED, "/hi 1");
            }
            case 2:
            {
                SendClientMessage(playerid, COLOR_RED, "/hi 2");
            }
            default:
            {
                //the message for the hi 1 or 2
            }
        }    
    }
    return 1;
}
Edit: Damn it, Vini replied before
Reply
#8

How i make it with words like yes / no
new word;
if(word == yes)
{ ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)