Problema.
#4

se puede hacer con un switch.
pawn Код:
zcmd(ucargador, playerid, params[])
{
    switch(GetPlayerWeapon(playerid)) {
        case 22,23: {
            if(JugadorInfo[playerid][jCartuchoP] == 0) {
                SendClientMessage(playerid, COLOR_GRAD2, "Usted no tiene municiуn para su pistola.");
                return 1;
            }
            SetPlayerAmmo(playerid, arma, GetPlayerAmmo(playerid)+17);
            JugadorInfo[playerid][jCartuchoP] -= 1;
            SendClientMessage(playerid, COLOR_BLANCO, "Usted ha utilizado un cargador para su pistola.");
        }
        case 25: {
            if(JugadorInfo[playerid][jCartuchoE] == 0) {
                SendClientMessage(playerid, COLOR_GRAD2, "Usted no tiene municiуn para su escopeta.");
                return 1;
            }
            SetPlayerAmmo(playerid, arma, GetPlayerAmmo(playerid)+4);
            JugadorInfo[playerid][jCartuchoE] -= 1;
            SendClientMessage(playerid, COLOR_BLANCO, "Usted ha utilizado un cargador para su escopeta.");
        }
        case 0: {
            SendClientMessage(playerid, COLOR_BLANCO, "No tienes ningun arma en mano.");
        }
        default: {
            SendClientMessage(playerid, COLOR_BLANCO, "Usted no tiene cartuchos para esta arma.");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Problema. - by Glimma - 09.11.2012, 22:34
Respuesta: Problema. - by Daniel-92 - 09.11.2012, 23:05
Respuesta: Problema. - by Glimma - 09.11.2012, 23:26
Respuesta: Problema. - by Daniel-92 - 09.11.2012, 23:36
Respuesta: Problema. - by Glimma - 10.11.2012, 00:06

Forum Jump:


Users browsing this thread: 2 Guest(s)