[Ajuda] Teleporte
#1

pawn Код:
//---------------------------------Teletransporte para a Pista de Corrida-------
CMD:pista1(playerid,params[])
{
    SetPlayerPos(playerid,-329.5341,1536.4436,76.6117);
    return 1;
}
//------------------------------------------------------------------------------
O problema й, Quando digito o comando /pista1 , O Player sai do carro, e й teletransportado sem veiculo.

Como eu posso alterar isso ?

Fazer que esse teletransporte, possa ser com carro ?
Reply
#2

pawn Код:
CMD:pista1(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid), State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
return SetVehiclePos(vehicleid, -329.5341, 1536.4436, 76.6117);
}
SetPlayerPos(playerid, -329.5341, 1536.4436, 76.6117);
return 1;
}
Reply
#3

Quote:
Originally Posted by Ouro
Посмотреть сообщение
pawn Код:
CMD:pista1(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid), State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
return SetVehiclePos(vehicleid, -329.5341, 1536.4436, 76.6117);
}
SetPlayerPos(playerid, -329.5341, 1536.4436, 76.6117);
return 1;
}
Funcionando Perfeitamente. Parabйns. + REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)