27.01.2019, 12:25
Код:
#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; }