[Ajuda] GetVehiclePos
#5

Mais aqui tenho que usar o playerid, pra pegar id do cara, como eu faзo?

pawn Код:
public OnVehiclePosChange(vehicleid, Float:oldposx, Float:oldposy, Float:oldposz, Float:newposx, Float:newposy, Float:newposz)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    GetVehiclePos(vehicleid, PlayerInfo[playerid][CarX], PlayerInfo[playerid][CarY], PlayerInfo[playerid][CarZ]);
    printf("[%d] Old Position: [%f,%f,%f] New Position: [%f,%f,%f]", vehicleid, oldposx, oldposy, oldposz, newposx, newposy, newposz);
    return 1;
}
@edit

presiso do id do cara que etб no veiculo pra altualizar as infoplayer dele, como eu faзo?

pawn Код:
public OnVehiclePosChange(vehicleid, Float:oldposx, Float:oldposy, Float:oldposz, Float:newposx, Float:newposy, Float:newposz)
{
    PlayerInfo[playerid][CarX] = newposx;
    PlayerInfo[playerid][CarY] = newposy;
    PlayerInfo[playerid][CarZ] = newposz;
    printf("[%d] Old Position: [%f,%f,%f] New Position: [%f,%f,%f]", vehicleid, oldposx, oldposy, oldposz, newposx, newposy, newposz);
    return 1;
}
Reply


Messages In This Thread
GetVehiclePos - by PabLoHenriique - 12.12.2014, 00:20
Re: GetVehiclePos - by Dayvison_ - 12.12.2014, 00:29
Re: GetVehiclePos - by willttoonn - 12.12.2014, 04:23
Re: GetVehiclePos - by Bruno13 - 12.12.2014, 05:08
Re: GetVehiclePos - by PabLoHenriique - 12.12.2014, 14:58
Re: GetVehiclePos - by PabLoHenriique - 12.12.2014, 15:07
Re: GetVehiclePos - by Bruno13 - 12.12.2014, 17:22
Re: GetVehiclePos - by JonathanFeitosa - 12.12.2014, 17:40
Re: GetVehiclePos - by Bruno13 - 12.12.2014, 17:47
Re: GetVehiclePos - by PabLoHenriique - 12.12.2014, 18:15

Forum Jump:


Users browsing this thread: 3 Guest(s)