sscanf Z parameter.
#3

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
don't exists Z parameter.
pawn Код:
CMD:house(playerid, params[])
{
    new
        string[50]
    ;
    if(sscanf(params,"s[50]", string))
        return SendClientMessage(playerid, COLOR_GREY, "USAGE: /house [buy/sell/lock/unlock/putgun/takegun/inventory]");

    if(!strcmp(string, "buy", true))
    {
        BuyHouseForPlayer(playerid);
        return 1;
    }
    if(!strcmp(string, "sell", true))
    {
        SellHouseForPlayer(playerid);
        return 1;
    }
    if(!strcmp(string, "lock", true))
    {
        LockPlayerHouse(playerid);
        return 1;
    }
    if(!strcmp(string, "unlock", true))
    {
        UnlockPlayerHouse(playerid);
        return 1;
    }
    if(!strcmp(string, "putgun", true))
    {
        PutGunPlayerHouse(playerid, slot);
        return 1;
    }
    if(!strcmp(string, "takegun", true))
    {
        TakeGunPlayerHouse(playerid, slot);
        return 1;
    }
    if(!strcmp(string, "inventory", true))
    {
        CheckPlayerHouseInventory(playerid);
        return 1;
    }
   
    return 1;
}
The Z was meant as the id of the slot.

Код:
    if(!strcmp(string, "putgun", true))
    {
		PutGunPlayerHouse(playerid, slot);
		return 1;
    }
    if(!strcmp(string, "takegun", true))
    {
		TakeGunPlayerHouse(playerid, slot);
		return 1;
    }
Reply


Messages In This Thread
sscanf Z parameter. - by Shetch - 11.04.2012, 07:27
Re: sscanf Z parameter. - by zSuYaNw - 11.04.2012, 07:36
Re: sscanf Z parameter. - by Shetch - 11.04.2012, 07:43
Re: sscanf Z parameter. - by Rachael - 11.04.2012, 07:51
Re: sscanf Z parameter. - by Shetch - 11.04.2012, 07:56

Forum Jump:


Users browsing this thread: 1 Guest(s)