How can i do this
#1

Hello,

Im creating a gamemode for a friend and ive hit a problem,
I was wondering how i can detect if the player is within certain radius of a car?
I tried searching and i didnt find anything.
Reply
#2

do it like:
Код:
new range[MAX_PLAYERS] = -1;
for(new v=0; v<MAX_VEHICLES; v++){
new Float:x, Float:y, Float:z;
GetVehiclePos(v, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)){
range[playerid] = v;
}
}
}
you need to add what should happen yourself:P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)