/house selltomarket "confirm" how to?
#2

Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>

new bool:g_HouseSale[MAX_PLAYERS];

CMD:house(playerid, params[])
{
    new option[24];
    
    if(sscanf(params, "s[24]", option)) 
        return SendClientMessage(playerid, -1, "USAGE: /house [selltomarket | selltomarket confirm]");
    
    if(!strcmp(option, "selltomarket confirm", true))
    {
        if(!g_HouseSale[playerid])
            return SendClientMessage(playerid, -1, "Use /house selltomarket");


        g_HouseSale[playerid] = false;
        SendClientMessage(playerid, -1, "House sold.");
        // User confirmed the sale
        return 1;
    }

    if(!strcmp(option, "selltomarket", true))
    {
        SendClientMessage(playerid, -1, "Use /house selltomarket confirm");
        g_HouseSale[playerid] = true;
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
/house selltomarket "confirm" how to? - by ShadowMortar - 27.01.2019, 06:06
Re: /house selltomarket "confirm" how to? - by TheToretto - 27.01.2019, 12:25
Re: /house selltomarket "confirm" how to? - by ShadowMortar - 27.01.2019, 14:41
Re: /house selltomarket "confirm" how to? - by codExpert - 27.01.2019, 15:07
Re: /house selltomarket "confirm" how to? - by Pottus - 27.01.2019, 15:43
Re: /house selltomarket "confirm" how to? - by TheToretto - 28.01.2019, 10:52

Forum Jump:


Users browsing this thread: 1 Guest(s)