[Tutorial] [TUT] Checar Бrea Player
#21

Otimo tutorial Drakon.
Reply
#22

ae eo seguinte, eu to fazendo um sistema de evento ai eu queria saber como e q eu fasso so pra anunciar quando tiver so um player.
Reply
#23

Alguem me pde ajudar neste pequeno erro aqui por favor?

pawn Code:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
public RestrictedArea(playerid)
    {
    if(IsPlayerInArea(playerid,-2484,-2542,-594,-625) == true) // LINHA 1278 - WARNING!
        {
        if(!IsPlayerAdmin(playerid) || AccInfo[playerid][Level] < 1)
            {
            SendClientMessage(playerid, 0xFF0000AA, "Get da Fuck out of ADMIN AREA.");
        }
    }return 1;
}
Estou a ter este warning:

pawn Code:
C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Pawno - Scripting\Scripting\LuxAdmin.pwn(1278) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Por favor preciso mesmo deste Script. Obrigado a todos desde jб.
Reply
#24

Warning nгo e erro e poste a linha 1278
Reply
#25

Oiaaaa!


Voltaram a seleзгo do tipo de post! Que bunito!


@DraKoN

Belo tutorial, man. Palmas.
Reply
#26

@nexco:

Tente:

pawn Code:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
public RestrictedArea(playerid)
{
    if(IsPlayerInArea(playerid,-2484,-2542,-594,-625) ) //Arruma as Coordenadas *-*
    {
        if(!IsPlayerAdmin(playerid) || AccInfo[playerid][Level] < 1)
        {
                        SendClientMessage(playerid, 0xFF0000AA, "Get da Fuck out of ADMIN AREA.");
            }
     }
    return 1;
}
Reply
#27

Quote:
Originally Posted by DraKoN
View Post
@nexco:

Tente:

pawn Code:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy) return 1;
    return 0;
}
public RestrictedArea(playerid)
{
    if(IsPlayerInArea(playerid,-2484,-2542,-594,-625) ) //Arruma as Coordenadas *-*
    {
        if(!IsPlayerAdmin(playerid) || AccInfo[playerid][Level] < 1)
        {
                        SendClientMessage(playerid, 0xFF0000AA, "Get da Fuck out of ADMIN AREA.");
            }
     }
    return 1;
}
Obrigado, inverti as coordenadas e funcionou bem, excepto o facto de mandar a mensagem tambйm para admins, ou seja qualquer player que lб entre recebe a mensagem. Como posso fazer para destinguir os admins neste caso AccInfo level >= 1.
Obrigado, e desculpem pelo desinterrar do tуpico.
Reply
#28

й so arrumar o codigo ^^
se o player for adm nгo manda a mensage e se ele nгo for manda a mensage
ou vice versa...
Reply
#29

Quote:
Originally Posted by nexco
View Post
Alguem me pde ajudar neste pequeno erro aqui por favor?

pawn Code:
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
public RestrictedArea(playerid)
    {
    if(IsPlayerInArea(playerid,-2484,-2542,-594,-625) == true) // LINHA 1278 - WARNING!
        {
        if(!IsPlayerAdmin(playerid) || AccInfo[playerid][Level] < 1)
            {
            SendClientMessage(playerid, 0xFF0000AA, "Get da Fuck out of ADMIN AREA.");
        }
    }return 1;
}
Estou a ter este warning:

pawn Code:
C:\Documents and Settings\Tiago Esteves\Ambiente de trabalho\Pawno - Scripting\Scripting\LuxAdmin.pwn(1278) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Por favor preciso mesmo deste Script. Obrigado a todos desde jб.
pawn Code:
if(IsPlayerInArea(playerid,-2484,-2542,-594,-625) == true) // LINHA 1278 - WARNING!
Mals ne mvi a linha desculpas heusheushe
Reply
#30

Quote:
Originally Posted by Canabis
View Post
й so arrumar o codigo ^^
se o player for adm nгo manda a mensage e se ele nгo for manda a mensage
ou vice versa...
Pois, tem boa lуgica e fбcil de perceber. Mas o meu problema й que nгo tenho capacidades para fazer isso .
Se alguйm me puder dar uma mгozinha. Muito obrigado pelas respostas atй agora.
Reply
#31

Espera aн!

Vocк quer que se o jogador saн do veнculo em qualquer parte do jogo envia a mensagem?

Entгo nгo precisa checar a бrea dele.

pawn Code:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    SendClientMessage(playerid,COLOR_GREY,"FDP NAO SAI DO CARRO PQP");
    return 1;
}
Reply
#32

nгo... eu sу estou colocando em qualquer бrea pra testar... depois vou salvar as coords que eu quero. Sу quero ver se consigo fazer a funзгo funcionar, o que nгo tou conseguindo =(
Reply
#33

Tenta em uma бrea menor.

pawn Code:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(IsPlayerInArea(playerid,1379.583, -1748.974, 1619.162, -1555.534))//Police Departament
    {
        SendClientMessage(playerid,COLOR_GREY,"FDP NAO SAI DO CARRO PQP");
    }
    return 1;
}
Tenta na DP.
Reply
#34

Tentei em todas as dps, rs, nгo funcionou... =(

Derrepente, se eu setasse 1 timer pra quando o player saisse de 1 veiculo, e nesse timer a funзгo... como ta sendo usada nos exemplos ali emcima... e dps de checar dar um killtimer. Serб que vai funcionar?
Reply
#35

Realmente nгo funcionou comigo.

Entгo, tentei com um cуdigo diferente.

Troca o IsPlayerInArea por isto:

pawn Code:
stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
{
    new RetValue = 0;
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z );
    if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
    {
       RetValue = 1;
    }
    return RetValue;
}
Comigo funcionou perfeitamente!
Reply
#36

Beleza!! Vou testar. Valeu pela ajuda!
Reply
#37

Quote:
Originally Posted by Larceny
View Post
Realmente nгo funcionou comigo.

Entгo, tentei com um cуdigo diferente.

Troca o IsPlayerInArea por isto:

pawn Code:
stock IsPlayerInPlace(playerid,Float:XMin,Float:YMin,Float:XMax,Float:YMax )
{
    new RetValue = 0;
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z );
    if( X >= XMin && Y >= YMin && X < XMax && Y < YMax )
    {
       RetValue = 1;
    }
    return RetValue;
}
Comigo funcionou perfeitamente!
esta a funcionar muito bem
Reply
#38

Queria uma ajuda


Queria que nao fosse kikado

queria que ao chegar la o player nao podesse passa


seria possivel alguem me ajuda ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)