forzar
#1

Hola, estoy haciendo el comando /forzar para las puertas, y me gustaria que me dijeran, como hago para que se ejecute el tipo de comando dependiendo del nivel 1-2-3, yo lo tengo asi... y no me sirve, їMe podrian decir como es, el tiemr lo tengo.



pawn Код:
CMD:forzar(playerid, params[])
{
    if(PlayerToPoint(10, playerid, 767.6719,13.6320,1000.7010))//Serнa la puerta
    if(Info[playerid][pLevel] == 6) return SendClientMessageEx(playerid,COLOR_WHITE,"No eres nivel 6.");//Nivel requerido
    {
    if(response)
    {
    if(listitem == 1)
    {
        if(Info[playerid][pForzarLevel] !=1)//Nivel 1 de ladrуn
        {
        GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
        SetTimerEx("ForzarNivel1", 30000, false, "ii", playerid, ForzarNivel1);//30 segundos forzando
            }
        }
        else if(Info[playerid][pForzarLevel] !=2)//Nivel 2 de ladrуn
        {
        GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
        SetTimerEx("ForzarNivel2", 20000, false, "ii", playerid, ForzarNivel2);//20 segundos forzando
            }
        }
        else if(Info[playerid][pForzarLevel] !=3)//Nivel 3 de ladrуn
        {
        GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
        SetTimerEx("ForzarNivel3", 10000, false, "ii", playerid, ForzarNivel3);//10 segundos forzando
            }
        }
    return 1;
}
Reply
#2

pawn Код:
CMD:forzar(playerid, params[])
{
    if(PlayerToPoint(10, playerid, 767.6719,13.6320,1000.7010))//Serнa la puerta
    if(Info[playerid][pLevel] < 6) return SendClientMessageEx(playerid,COLOR_WHITE,"No eres nivel 6.");//Nivel requerido
        if(Info[playerid][pForzarLevel] ==1)//Nivel 1 de ladrуn
        {
        GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
        SetTimerEx("ForzarNivel1", 30000, false, "ii", playerid, ForzarNivel1);//30 segundos forzando
        }
        else if(Info[playerid][pForzarLevel] ==2)//Nivel 2 de ladrуn
        {
        GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
        SetTimerEx("ForzarNivel2", 20000, false, "ii", playerid, ForzarNivel2);//20 segundos forzando
        }
        else if(Info[playerid][pForzarLevel] ==3)//Nivel 3 de ladrуn
        {
        GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
        SetTimerEx("ForzarNivel3", 10000, false, "ii", playerid, ForzarNivel3);//10 segundos forzando
        }
    return 1;
}
Reply
#3

pawn Код:
CMD:forzar(playerid, params[]){
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 767.6719,13.6320,1000.7010))//Serнa la puerta
    if(Info[playerid][pLevel] < 6) return SendClientMessageEx(playerid,COLOR_WHITE,"No eres nivel 6.");//Nivel requerido
    switch(Info[playerid][pForzarLevel]){
        case 1:{//Nivel 1 de ladrуn
            GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
            ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
            SetTimerEx("ForzarNivel1", 30000, false, "ii", playerid, ForzarNivel1);//30 segundos forzando
        }
        case 2:{//Nivel 2 de ladrуn
            GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
            ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
            SetTimerEx("ForzarNivel2", 20000, false, "ii", playerid, ForzarNivel2);//20 segundos forzando
        }
        case 3:{//Nivel 3 de ladrуn
            GameTextForPlayer(i, "~r~forzando~n~~r~cerradura", 5000, 1);//Texto al forzar
            ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);//Animaciуn al forzar
            SetTimerEx("ForzarNivel3", 10000, false, "ii", playerid, ForzarNivel3);//10 segundos forzando
        }
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)