putting isplayerinrange with this?
#1

okay so i got this:
pawn Код:
//more code  
  if(IsAttached[i] == true)
                {
                    if(GetPlayerVehicleID(playerid) == i)
                    {
                        new i2 = GetPlayerVehicleID(playerid);
                        (VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2] * Dist),7,100);
                        new Float:armour, Float:newarmour;
                        GetPlayerArmour(i,armour);
                        if(armour > 0){
                        newarmour = armour - -5;
                        SetPlayerArmour(i,newarmour);
                                                //more code
but i get this warning

Quote:

C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

on this line

pawn Код:
(VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2] * Dist),7,100);
but i was wondering if you could add isplayerinrangeofpoint with a object that was created?
Reply
#2

Should be something like:
pawn Код:
if(IsPlayerInRangeOfPoint(i,RANGE,VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehvCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2]*Dist)))
Is that from my tankveh code? xD
Reply
#3

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Should be something like:
pawn Код:
if(IsPlayerInRangeOfPoint(i,RANGE,VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehvCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2]*Dist))
Is that from my tankveh code? xD
yes, yes it is xD

edit

Quote:

C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : error 017: undefined symbol "RANGE"
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : warning 215: expression has no effect
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#4

Where does this script come from? Because I know I have commented lately on a thread which addressed exactly the same problem ..
Reply
#5

Quote:
Originally Posted by Vince
Посмотреть сообщение
Where does this script come from? Because I know I have commented lately on a thread which addressed exactly the same problem ..
https://sampforum.blast.hk/showthread.php?tid=174082

but mines uber edited
Reply
#6

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
yes, yes it is xD

edit

STUFF
Yes I've edited my code I missed a bracket on the end.
Recopy it!

And RANGE is the range you specify.. 8.0 for example.
Reply
#7

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Yes I've edited my code I missed a bracket on the end.
Recopy it!

And RANGE is the range you specify.. 8.0 for example.
yeah, i thought it was distance xD

anyway:

Quote:

C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : error 017: undefined symbol "VehvCameraPos"
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : warning 215: expression has no effect
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Will\Desktop\DeathRace0.3b\filterscripts\ minigun2.pwn(7 : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#8

pawn Код:
if(IsPlayerInRangeOfPoint(i,RANGE,VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2]*Dist)))
Misspelled Veh as Vehv..
Reply
#9

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
if(IsPlayerInRangeOfPoint(i,RANGE,VehCameraPos[i2][0]+(VehVectorPos[i2][0] * Dist),VehCameraPos[i2][1]+(VehVectorPos[i2][1] * Dist),VehCameraPos[i2][2]+(VehVectorPos[i2][2]*Dist)))
Misspelled Veh as Vehv..
yeah, i tried that before, now i get 7 errors about the stuff underneath it isnt defined


EDITTTT FIXED!!!!!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)