How to get the player range
#1

Hi i need to get the player range point for the fuel station i tried to do /save and take that code and put it in but dident work any way to get IsPlayerInRangeOfPoint(playerid
Reply
#2

pawn Код:
IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z);
Look the parameters, show us what it saved on the saved position on My Documents and where did you use that.
Reply
#3

0,69.0161,1219.9005,18.8061,144.4481,0,0,0,0,0,0 this is what saved
this is where i want to put it want to change location of it
if(!IsPlayerInRangeOfPoint(playerid, 5, 2254.8438,30.5055,26.4135)
Reply
#4

The x, y, z are the 2nd, 3rd and 4th parameter.
pawn Код:
if( !IsPlayerInRangeOfPoint( playerid, 5, 69.0161, 1219.9005, 18.8061 ) )
{
    // code;
}
Reply
#5

Now i get this
warning 217: loose indentation
: error 017: undefined symbol "FuelVar"
) : warning 215: expression has no effect
PCRP.pwn(25129) : error 001: expected token: ";", but found "]"
PCRP.pwn(25129) : error 029: invalid expression, assumed zero
Reply
#6

Can you show us lines 25125 to 25130, please?
Reply
#7

for(new vehid=0; vehid < MAX_VEHICLES; vehid++)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine && Fuel[vehid])
{
FuelVar[vehid] ++;
if(GetVehicleSpeed(vehid, 0) != 0 && FuelVar[vehid] >= 72/2)
{
Reply
#8

Have you defined the FuelVar?
pawn Код:
// As global variable
new
   FuelVar[ MAX_VEHICLES ]
;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)