*** Terrible Title Removed
#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


Messages In This Thread
*** Terrible Title Removed - by Majava - 23.10.2012, 21:02
Re: I wanna know few things. - by Eminem 2ka9 - 23.10.2012, 21:06
Re: I wanna know few things. - by Anthony © - 23.10.2012, 21:15
Re: I wanna know few things. - by Majava - 23.10.2012, 21:28
Re: I wanna know few things. - by Anthony © - 23.10.2012, 21:46
Re: I wanna know few things. - by ViniBorn - 23.10.2012, 21:48
Re : I wanna know few things. - by lelemaster - 23.10.2012, 21:49
Re: Re : I wanna know few things. - by Majava - 23.10.2012, 22:47

Forum Jump:


Users browsing this thread: 1 Guest(s)