Vehicle ID problem
#1

look: I do this:

SetVehiclePos(vehicleid, 2033.4703,-3198.5300,5.0862);

and it says:
C:\Users\William\Downloads\TI\Backup\Tropical Island Server\filterscripts\Teleport.pwn(46) : error 017: undefined symbol "vehcleid"
Reply
#2

Change Vehicleid with your vehicle ID!Script doesnt know what car to spawn, all of them maybe?
EXAMPLE
pawn Код:
SetVehiclePos(1,2033.4703,-3198.5300,5.0862); // It is your vehicle ID, that 1, do /dl to see all ID-s
Reply
#3

what car ID for the car the player has?
Reply
#4

do:
new vehicleid == GetPlayerVehicleID(playerid);
Reply
#5

so the vehicle id is getplayervehicleID?

so:

setplayervehiclepos(GetplayervehicleID, xyz); ?
Reply
#6

GetPlayerVehicleID returns the id of the vehicle that the written playerid is inside (playerid is the one executing the code)
Reply
#7

so what should I write?
Reply
#8

Depends.
What is this code supposed to do, or what is it connected with?

Is it going to teleport a player which types the command?
If so, use GetPlayerVehicleID(playerid).
Reply
#9

for example when a player has got a turismo, and he teles to example /stuntpark I want him to keep h is turismo...

and that with all cars, players need to keep their car...
Reply
#10

Then use GetPlayerVehicleID - problem solved.
Reply
#11

So there are two ways to do that.
pawn Код:
// Option 1:
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, X, Y, Z); //fill in with your coordinates

//Option 2
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z); //Fill with your coordinates again
Reply
#12

now I get this:

error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

SetVehiclePos( GetPlayerVehicleID , -2344.8931,-1603.9287,489.2245);
Reply
#13

No point showing error when we don't see the code.
Reply
#14

now I get this:

error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

SetVehiclePos( GetPlayerVehicleID , -2344.8931,-1603.9287,489.2245);
Reply
#15

Quote:
Originally Posted by randomkid88
Посмотреть сообщение
So there are two ways to do that.
pawn Код:
// Option 1:
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, X, Y, Z); //fill in with your coordinates

//Option 2
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z); //Fill with your coordinates again
Check again.
Reply
#16

look I did exactly the same as option 2...
Reply
#17

No you didn't.

GetPlayerVehicleID, X, Y, Z
GetPlayerVehicleID(playerid), X, Y, Z
Reply
#18

woops, thanks it works
Reply
#19

Your welcome
Reply
#20

NOW I can't go there anymore onfoot teleport I removedf my onfoot teleport cuz otherwise I wasn't able to teleport in car, please help!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)