How transform zcmd command in classic cmds?
#1

pawn Код:
command(addhouse, playerid, params[]) {
    if(sscanf(params, "ii", sscanfid[0], sscanfid[1])) {
        SendClientMessage(playerid, COLOR_SYSTEM, "[Parameters]: /addhouse <Price> <Interior - View below>");
        SendClientMessage(playerid, COLOR_SYSTEM, "[Interiors]: Jefferson Motel (1) | House Large 1 (2) | House Medium (3)");
        SendClientMessage(playerid, COLOR_SYSTEM, "[Interiors]: House Small (4) | House Large 2 (5) | House Small 2 (6)");
        SendClientMessage(playerid, COLOR_SYSTEM, "[Interiors]: House Small 3 (7) | House Small 4 (8) | Colonel Furhberger's (9)");
        SendClientMessage(playerid, COLOR_SYSTEM, "[Interiors]: Safeh 1 (10) | Safeh 2 (11) | CJ's House (12) | Madd Dogg's (13)");
        SendClientMessage(playerid, COLOR_SYSTEM, "[Interiors]: Safeh 3 (14) | Safeh 4 (15)");
        return 1;
    }
    if(IsPlayerAdmin(playerid)) {
        if(sscanfid[1] > 15 && sscanfid[1] < 1) return SendClientMessage(playerid, COLOR_SYSTEM, "[Error]: Choose houses 1 - 15.");
        format(string, sizeof(string), "[Admin]: Admin %s has added a house.", GetUserName(playerid));
        SendClientMessageToAdmins(string);
        new Float:ppos[3];
        GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
        AddServerHouse(ppos[0], ppos[1], ppos[2], sscanfid[0], sscanfid[1]);
    }
    else {
        SendBlockedAdminCommand(playerid, 5);
    }
    return 1;
}
Help please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)