SA-MP Forums Archive
[AJUDA] Problema com RemovePlayerFromVehicle - 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] Problema com RemovePlayerFromVehicle (/showthread.php?tid=176077)



[AJUDA] Problema com RemovePlayerFromVehicle - lucasgolino - 12.09.2010

tipo, estava fasendo o GM para o meu server de RPG. quando estava fasendo o sistema de gasolina, estava funcionando perfeito, so que esta com 1 problema, mesmo que a gasolina for 0 ele nao remove.

Codigo:
Код:
public GasolineFunctions(playerid)
{
	if(Gasolina[playerid] <= 0)
	    {
	        SendClientMessage(playerid, COR_VERMELHO, "VOCE NAO TEM GASOLINA, VA A UM POSTO E DIGITE: /abastecer X");
			RemovePlayerFromVehicle(playerid);
			return 1;
	    }
    Gasolina[playerid] = Gasolina[playerid] - 1;
   	new gasolinex[41];
	format(gasolinex, sizeof(gasolinex), "Gasolina: %d", Gasolina[playerid]);
	TextDrawSetString(Textdraw2, gasolinex);
	TextDrawShowForPlayer(playerid, Textdraw2);
	return 1;
    
}
Ajuda ai, Obrigado des de ja


Re: [AJUDA] Problema com RemovePlayerFromVehicle - Gabriel_Halls - 12.09.2010

pawn Код:
public GasolineFunctions(playerid)
{
    if(Gasolina[playerid] <= 0)
        {
            SendClientMessage(playerid, COR_VERMELHO, "VOCE NAO TEM GASOLINA, VA A UM POSTO E DIGITE: /abastecer X");
            return 1;
        }
    Gasolina[playerid] = Gasolina[playerid] - 1;
    new gasolinex[41];
    format(gasolinex, sizeof(gasolinex), "Gasolina: %d", Gasolina[playerid]);
    TextDrawSetString(Textdraw2, gasolinex);
    TextDrawShowForPlayer(playerid, Textdraw2);
      RemovePlayerFromVehicle(playerid);
    return 1;
   
}
tenta.


Re: [AJUDA] Problema com RemovePlayerFromVehicle - lucasgolino - 12.09.2010

er. nao daria certo , pois o seguinte, ele so remove se a gasolina for 0. ali ele removeria mesmo sendo 1 2 3 4 etc.


Re: [AJUDA] Problema com RemovePlayerFromVehicle - Gabriel_Halls - 12.09.2010

vc tem o comando /sair pra sai dos veiculos ?? entгo deicha que os cara digita /sair =D.


Re: [AJUDA] Problema com RemovePlayerFromVehicle - lucasgolino - 12.09.2010

so que o veiculo nao para , nem sei como faser para ele nao andar mais '-';


Re: [AJUDA] Problema com RemovePlayerFromVehicle - Shelby - 12.09.2010

pawn Код:
TogglePlayerControllable(playerid, false);//congelado (parado)
TogglePlayerControllable(playerid, true);//descongelado



Re: [AJUDA] Problema com RemovePlayerFromVehicle - zSuYaNw - 12.09.2010

https://sampwiki.blast.hk/wiki/Velocity_Tutorial


Re: [AJUDA] Problema com RemovePlayerFromVehicle - Kasura - 12.09.2010

Tenta esse ^^

pawn Код:
public GasolineFunctions(playerid)
{
if(Gasolina[playerid] <= 0)
{
SendClientMessage(playerid, COR_VERMELHO, "VOCE NAO TEM GASOLINA, VA A UM POSTO E DIGITE: /abastecer X");
RemovePlayerFromVehicle(playerid);
new Float:Px = 0.000000, Float:Py = 0.000000, Float:Pz = 0.000000, Float:Pa = 0.000000;
GetPlayerPos(playerid, Px, Py, Pz);
GetPlayerFacingAngle(playerid, Pa);
SetPlayerPos(playerid,Px+2,Py+2,Pz+1);
return 1;
}
Gasolina[playerid] = Gasolina[playerid] - 1;
new gasolinex[41];
format(gasolinex, sizeof(gasolinex), "Gasolina: %d", Gasolina[playerid]);
TextDrawSetString(Textdraw2, gasolinex);
TextDrawShowForPlayer(playerid, Textdraw2);
return 1;  
}
responde se funcionar


Re: [AJUDA] Problema com RemovePlayerFromVehicle - lucasgolino - 12.09.2010

Kasura funciono sim, Vlw todos ai . Mt Obrigado


Re: [AJUDA] Problema com RemovePlayerFromVehicle - Kasura - 12.09.2010

=D que bom que funcionou ^^