Existe essa funзгo? -
smithz0r - 14.10.2012
Existe a funзгo de verificar se o player estб em um veнculo?
Exemplo:
Код:
if (!Player tб num veнculo)
{
SendClientMessage(playerid, Cor, "Vocк precisa de um veнculo para participar do evento");
}
Re: Existe essa funзгo? -
DrTHE - 14.10.2012
https://sampwiki.blast.hk/wiki/IsPlayerInAnyVehicle
Re: Existe essa funзгo? -
[JD]BlackFire - 14.10.2012
IsPlayerInVehicle - estб em um determinado eнculo
IsPlayerInAnyVehicle - estб em qualquer veнculo
Re: Existe essa funзгo? -
smithz0r - 14.10.2012
Obrigado aos dois.
Re: Existe essa funзгo? -
smithz0r - 14.10.2012
Deu errado, o cуdigo:
Код:
if (IsPlayerInAnyVehicle)
{
SetPlayerPos(playerid, 1470.9702,-2494.0969,13.5547,268);
SendClientMessage(playerid, Vermelho, "Vocк foi para o evento");
ResetPlayerWeaponsEx(playerid);
}
Erro: 076: syntax error in the expression, or invalid function call
Re: Existe essa funзгo? -
[JD]BlackFire - 14.10.2012
if (IsPlayerInAnyVehicle(playerid))
Re: Existe essa funзгo? -
telmo_ferreira - 14.10.2012
pawn Код:
if (IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid, 1470.9702,-2494.0969,13.5547,268);
SendClientMessage(playerid, Vermelho, "Vocк foi para o evento");
ResetPlayerWeaponsEx(playerid);
}
Re: Existe essa funзгo? -
netogba - 14.10.2012
Код:
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid)
{
SetPlayerPos(playerid, px, py, pz);
SetPlayerCameraPos(playerid, px, py, pz);
SetVehiclePos(vehicleid, px, py, pz);
PutPlayerInVehicle(playerid, vehicleid, 0);
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "{FF0000}( ERRO ){FFFFFF} Vocк precisa de um veнculo!");
}
}
e.e '-'
Re: Existe essa funзгo? -
smithz0r - 14.10.2012
E como faz pro carro se teleportar junto com o player?
Re: Existe essa funзгo? -
humildadeforever - 14.10.2012
SetVehiclePos