[ajuda] Coisa basica com teleporte
#1

Ae, ontem eu postei um projeto aqui, era de um clube e eu podia entrar nele usando comando e "F", ai tentei tirar os comandos e usar ele como se fosse para entrar apertando apenas "F", so que quando aperto "F" o player nao й posicionado nas coordenadas, se alguem puder ajudar + REP!

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys==KEY_SECONDARY_ATTACK))
      {if(IsPlayerInRangeOfPoint(playerid, 2.0, 578.6855,-2195.5337,1.6288))
        {
            ApplyAnimation(playerid,"DAM_JUMP","DAM_LAUNCH",2,0,1,1,0,0);
        }
        return 1;
        
     if(IsPlayerInRangeOfPoint(playerid, 2.0, 1081.1975,-1696.7900,13.5469))
        {
            SetPlayerPos(playerid, 575.7503,-2046.9207,16.1670);
            SendClientMessage(playerid, COLOR_GREEN, "[BSL] Bem Vindo ao Clube do Brasil Start Life, Vocк pagou R$ 50,00 para entrar no clube.");
            GivePlayerMoney(playerid,-50);
        }
        return 1;

     if(IsPlayerInRangeOfPoint(playerid, 2.0, 575.5306,-2050.3894,16.1700))
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1081.0916,-1697.7324,13.5469);
            SendClientMessage(playerid, COLOR_GREEN, "[BSL] Obrigado por Visitar o Clube, Volte Sempre!");
        }
        return 1;

     if(IsPlayerInRangeOfPoint(playerid, 2.0, 559.5461,-2033.9458,16.1743))
        {
            SetPlayerPos(playerid, 559.4380,-2092.8203,2.67120);
        }
        return 1;

     if(IsPlayerInRangeOfPoint(playerid, 2.0, 559.5261,-2095.8760,2.6254))
        {
            SetPlayerPos(playerid, 561.7214,-2033.8285,16.1670);
        }
        return 1;

     if(IsPlayerInRangeOfPoint(playerid, 2.0, 570.5856,-2095.8291,2.6077))
        {
            SetPlayerPos(playerid, 527.8544,-2082.4460,17.2253);
        }
        return 1;

     if(IsPlayerInRangeOfPoint(playerid, 2.0, 530.4130,-2082.5781,17.2253))
        {
            SetPlayerPos(playerid, 570.3227,-2093.3599,2.6448);
        }
        return 1;

     if(IsPlayerInRangeOfPoint(playerid, 2.0, 578.6855,-2195.5337,1.6288))
        {
            SetPlayerPos(playerid, 578.5896,-2194.7065,7.1380);
        }
        return 1;

    return 1;
    }
}
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys==KEY_SECONDARY_ATTACK))
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 578.6855,-2195.5337,1.6288))
        {
            ApplyAnimation(playerid,"DAM_JUMP","DAM_LAUNCH",2,0,1,1,0,0);
        }
        return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 1081.1975,-1696.7900,13.5469))
    {
        SetPlayerPos(playerid, 575.7503,-2046.9207,16.1670);
        SendClientMessage(playerid, COLOR_GREEN, "[BSL] Bem Vindo ao Clube do Brasil Start Life, Vocк pagou R$ 50,00 para entrar no clube.");
        GivePlayerMoney(playerid,-50);
    }
    return 1;
}
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 575.5306,-2050.3894,16.1700))
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 1081.0916,-1697.7324,13.5469);
        SendClientMessage(playerid, COLOR_GREEN, "[BSL] Obrigado por Visitar o Clube, Volte Sempre!");
    }
    return 1;
}
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 559.5461,-2033.9458,16.1743))
    {
        SetPlayerPos(playerid, 559.4380,-2092.8203,2.67120);
    }
    return 1;
}
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 559.5261,-2095.8760,2.6254))
    {
        SetPlayerPos(playerid, 561.7214,-2033.8285,16.1670);
    }
    return 1;
}
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 570.5856,-2095.8291,2.6077))
    {
        SetPlayerPos(playerid, 527.8544,-2082.4460,17.2253);
    }
    return 1;
}
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 530.4130,-2082.5781,17.2253))
    {
        SetPlayerPos(playerid, 570.3227,-2093.3599,2.6448);
    }
    return 1;
}
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 578.6855,-2195.5337,1.6288))
    {
        SetPlayerPos(playerid, 578.5896,-2194.7065,7.1380);
    }
    return 1;
    }
    return 1;
    }
}
Reply
#3

vlw ae kra ,mas deu alguns erros

Код:
C:\Users\User4\Desktop\Clube\Clube.pwn(213) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(219) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(221) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(225) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(227) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(231) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(233) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(237) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(239) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(243) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(245) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(249) : error 010: invalid function or declaration
C:\Users\User4\Desktop\Clube\Clube.pwn(251) : error 010: invalid function or declaration
Reply
#4

Tenta ae!
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys==KEY_SECONDARY_ATTACK)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 578.6855,-2195.5337,1.6288))
        {
            ApplyAnimation(playerid,"DAM_JUMP","DAM_LAUNCH",2,0,1,1,0,0);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1081.1975,-1696.7900,13.5469))
        {
            SetPlayerPos(playerid, 575.7503,-2046.9207,16.1670);
            SendClientMessage(playerid, COLOR_GREEN, "[BSL] Bem Vindo ao Clube do Brasil Start Life, Vocк pagou R$ 50,00 para entrar no clube.");
            GivePlayerMoney(playerid,-50);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 575.5306,-2050.3894,16.1700))
        {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1081.0916,-1697.7324,13.5469);
            SendClientMessage(playerid, COLOR_GREEN, "[BSL] Obrigado por Visitar o Clube, Volte Sempre!");
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 559.5461,-2033.9458,16.1743))
        {
            SetPlayerPos(playerid, 559.4380,-2092.8203,2.67120);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 559.5261,-2095.8760,2.6254))
        {
            SetPlayerPos(playerid, 561.7214,-2033.8285,16.1670);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 570.5856,-2095.8291,2.6077))
        {
            SetPlayerPos(playerid, 527.8544,-2082.4460,17.2253);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 530.4130,-2082.5781,17.2253))
        {
            SetPlayerPos(playerid, 570.3227,-2093.3599,2.6448);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 578.6855,-2195.5337,1.6288))
        {
            SetPlayerPos(playerid, 578.5896,-2194.7065,7.1380);
        }
    }
    return 1;
}
Reply
#5

Boaa, vlw aee kra

e parabens pelos seus Projetos , sгo muito bons, curti muito eles +REP!

So 1 duvida, vc sabe como q faz pra escrever mensagens no jogo?
por exemplo, esse projeto ai do clube, como q faz pra eu colocar uma mensagem tipo, bem vindo ao clube, aperte f para entrar, vc sabe? se n souber ta tranquilo, vlws aE!!
Reply
#6

Ponha no OnGameModeInit isto:
pawn Код:
Create3DTextLabel("Bem Vindo Ao Clube\nAperte F Para Entrar",-1,1081.1975, -1696.7900, 13.5469,60.0,0);
Reply
#7

pawn Код:
Create3DTextLabel("Bem vindo ao clube. Para entrar aperte F", -1 ,358.2364,169.6588,1008.3893,20.0,0,0);
Troca ali 358.2364,169.6588,1008.3893
que sгo as coordenadas.
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Reply
#8

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
pawn Код:
Create3DTextLabel("Bem vindo ao clube. Para entrar aperte F", -1 ,358.2364,169.6588,1008.3893,20.0,0,0);
Troca ali 358.2364,169.6588,1008.3893
que sгo as coordenadas.
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Use este acima q esta correto! -↨↨↨-
Reply
#9

Se for usa variros teleportes pode usar este FS que eu fiz: http://forum.sa-mp.com/showthread.ph...47#post1645247

Ocupa bem menas linhas e й facil de usar :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)