SA-MP Forums Archive
[Ajuda] Nгo entrar em Veнculos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Nгo entrar em Veнculos (/showthread.php?tid=412457)



Nгo entrar em Veнculos - MatheusFuria - 02.02.2013

Eae galera, to querendo saber se tem alguma funзгo que nгo deixa o Player entrar no Veнculo , claro que tem mais eu nгo sei , andei pesquisando e nгo achei.

Exemplo: Sou da ORG GROOVE , Vou entrar no carro dos BALLAS e vou sair com o RemovePlayerFromVehicle

queria saber qual a funзгo que nгo deixa o player nem entrar no Veнculo!


Re: Nгo entrar em Veнculos - zSuYaNw - 02.02.2013

Tente isto:


pawn Код:
//No topo
new MeuCarro;


// OnGameMode Init
MeuCarro = AddStaticVehicle( ... );



// No OnPlayerEnterVehicle
if(vehicleid == MeuCarro){
    // Aqui tu bota a funзгo que checa qual й a org do player, se for diferente da org "MeuCarro"
    // vocк bota o removeplayerfromvehicle.
}



Re: Nгo entrar em Veнculos - MatheusFuria - 02.02.2013

Vei isso eu ja tenho , eu to querendo apenas a funзгo pro Player nгo poder entrar no Carro , eu ja tenho tudo definido


Re: Nгo entrar em Veнculos - zSuYaNw - 02.02.2013

nгo existe esta funзгo. Vocк tem que criar.


A funзгo OnPlayerEnterVehicle й chamada quando alguйm entra no carro -fikdik


Re: Nгo entrar em Veнculos - Etton - 02.02.2013

Na public OnPlayerEnterVehicle:

Код:
if(vehicleid == nє veнculo){
new Float:PlayerPosX,Float:PlayerPosY,Floay:PlayerPosZ;
GetPlayerPos(playerid,PlayerPosX,PlayerPosY,PlayerPosZ);
SetPlayerPos(playerid,PlayerPosX,PlayerPosY,PlayerPosZ);
SendClientMessage(playerid,-1,"Vocк nгo pode entrar neste veнculo!");}



Re: Nгo entrar em Veнculos - tonisantolia - 02.02.2013

Quote:
Originally Posted by Etton
Посмотреть сообщение
Na public OnPlayerEnterVehicle:

Код:
if(vehicleid == nє veнculo){
new Float:PlayerPosX,Float:PlayerPosY,Floay:PlayerPosZ;
GetPlayerPos(playerid,PlayerPosX,PlayerPosY,PlayerPosZ);
SetPlayerPos(playerid,PlayerPosX,PlayerPosY,PlayerPosZ);
SendClientMessage(playerid,-1,"Vocк nгo pode entrar neste veнculo!");}
WTF KKKKKKKKKKKKKKKKKKKK Nгo era mais simples usar RemovePlayerFromVehicle? suahuahsusahushau euri d+.


Re: Nгo entrar em Veнculos - zSuYaNw - 02.02.2013

Quote:
Originally Posted by Etton
Посмотреть сообщение
Na public OnPlayerEnterVehicle:

Код:
if(vehicleid == nє veнculo){
new Float:PlayerPosX,Float:PlayerPosY,Floay:PlayerPosZ;
GetPlayerPos(playerid,PlayerPosX,PlayerPosY,PlayerPosZ);
SetPlayerPos(playerid,PlayerPosX,PlayerPosY,PlayerPosZ);
SendClientMessage(playerid,-1,"Vocк nгo pode entrar neste veнculo!");}
Quote:
Originally Posted by tonisantolia
Посмотреть сообщение
WTF KKKKKKKKKKKKKKKKKKKK Nгo era mais simples usar RemovePlayerFromVehicle? suahuahsusahushau euri d+.
Na verdade o Cуdigo do Etton remove o player de carros especiais, como RC,
pois a funзгo "RemovePlayerFromVehicle" nгo funciona em carros rc.


Re: Nгo entrar em Veнculos - Maklister - 02.02.2013

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
Na verdade o Cуdigo do Etton remove o player de carros especiais, como RC,
pois a funзгo "RemovePlayerFromVehicle" nгo funciona em carros rc.
Alem que se um jogador estiver entrando no carro e outro jogador tentar roubar mais nao conseguir o carro " buga " e o RemovePlayerFromVehicle nгo funciona.


Respuesta: Nгo entrar em Veнculos - bastiga - 02.02.2013

Cara serб que voce nao retirou sem querer o "!" antes da variavel para identficar a org?
pawn Код:
else if(IsABallasCar(newcar))
            {
                if(!IsABallas(playerid))
                {
                    SendClientMessage(playerid, COR_BALLAS, "Vocк nгo й dos Ballas, por isso nгo tem a chave desse veнculo !");
                    RemovePlayerFromVehicleEx(playerid);
                }
            }
to so dando uma de muitas razoes para isso acontecer, tenta ai e fala alguma coisa ...


Re: Nгo entrar em Veнculos - HardWar - 02.02.2013

Faзa uma verificaзгo na callback OnPlayerStateChange. A callback OnPlayerEnterVehicle й chamada quando o jogador aperta F para entrar, por isso o RemovePlayerFromVehicle nгo funciona.