Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
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"
Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
what car ID for the car the player has?
Posts: 1,495
Threads: 131
Joined: Jul 2009
Reputation:
0
do:
new vehicleid == GetPlayerVehicleID(playerid);
Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
so the vehicle id is getplayervehicleID?
so:
setplayervehiclepos(GetplayervehicleID, xyz); ?
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
GetPlayerVehicleID returns the id of the vehicle that the written playerid is inside (playerid is the one executing the code)
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
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).
Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
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...
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
Then use GetPlayerVehicleID - problem solved.
Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
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);
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
No point showing error when we don't see the code.
Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
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);
Posts: 918
Threads: 148
Joined: Sep 2010
Reputation:
0
look I did exactly the same as option 2...
Posts: 308
Threads: 17
Joined: Mar 2010
Reputation:
0
No you didn't.
GetPlayerVehicleID, X, Y, Z
GetPlayerVehicleID(playerid), X, Y, Z