[Ajuda] Ajuda rapida!
#3

Quote:
Originally Posted by SamuelMatheus05
Посмотреть сообщение
Olб galera queria saber se existe alguma funзao para ver se o player estб perto de algum veiculo!

Se estiver pesso q me ajudem pfv.

Desde jб obg!
Tente usar essa stock:

PHP код:
native IsValidVehicle(vehicleid);
forward Float:GetPlayerDistanceFromVehicle(playeridvehicleid);
stock Float:GetPlayerDistanceFromVehicle(playeridvehicleid) {
    if(!
IsPlayerConnected(playerid) || !IsValidVehicle(vehicleid)) return -1.0;
    new 
Float:P[6];
    
GetPlayerPos(playeridP[0], P[1], P[2]);    GetVehiclePos(vehicleidP[3], P[4], P[5]);
    return 
VectorSize((P[0] - P[3]), (P[1] - P[4]), (P[2] - P[5]));

Reply


Messages In This Thread
Ajuda rapida! - by SamuelMatheus05 - 05.03.2018, 00:14
Re: Ajuda rapida! - by Marllun - 05.03.2018, 00:24
Re: Ajuda rapida! - by JohnBlack - 05.03.2018, 19:48
Re: Ajuda rapida! - by FerrariL - 06.03.2018, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)