SA-MP Forums Archive
How transform zcmd command in classic cmds? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How transform zcmd command in classic cmds? (/showthread.php?tid=263961)



How transform zcmd command in classic cmds? - GeonMake - 24.06.2011

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.