Adding car nos if player/vehicle pos is..
#1

Hello.
I tried to figure out, that how can i add nos to car when player/vehicle pos is 352.12,-1135.57,2190.69?

Nos component id is 1010
Can somebody help me?

EDIT: And when it's possible then add nos when pos is 352.12,-1135.57,2190.69 and range is about 10 or 5?
Reply
#2

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.5, 352.12,-1135.57,2190.69))
{
     AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
I have used IsPlayerInRangeOfPoint because you will probably find it'll be very hard for a player to be in those exact coordinates
Reply
#3

yes, thank you!
I started to think same.
Reply
#4

No problem

Ugh, This forum requires that you wait 120 seconds between posts. Please try again in 91 seconds.
Reply
#5

Quote:
Originally Posted by pliptm
Посмотреть сообщение
yes, thank you!
I started to think same.
Use IsPlayerInRange, it can be found in the ul.inc include.

Otherwise the player's could be at any z-axis.
Reply
#6

EDIT: Already got it, but still big big thanks to you..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)