Vehicle ID problem -
knackworst - 20.10.2010
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"
Re: Vehicle ID problem -
Mean - 20.10.2010
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
Re: Vehicle ID problem -
knackworst - 20.10.2010
what car ID for the car the player has?
Re: Vehicle ID problem -
Sascha - 20.10.2010
do:
new vehicleid == GetPlayerVehicleID(playerid);
Re: Vehicle ID problem -
knackworst - 20.10.2010
so the vehicle id is getplayervehicleID?
so:
setplayervehiclepos(GetplayervehicleID, xyz); ?
Re: Vehicle ID problem -
LarzI - 20.10.2010
GetPlayerVehicleID returns the id of the vehicle that the written playerid is inside (playerid is the one executing the code)
Re: Vehicle ID problem -
knackworst - 20.10.2010
so what should I write?
Re: Vehicle ID problem -
LarzI - 20.10.2010
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).
Re: Vehicle ID problem -
knackworst - 20.10.2010
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...
Re: Vehicle ID problem -
LarzI - 20.10.2010
Then use GetPlayerVehicleID - problem solved.
Re: Vehicle ID problem -
randomkid88 - 20.10.2010
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
Re: Vehicle ID problem -
knackworst - 20.10.2010
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);
Re: Vehicle ID problem -
LarzI - 20.10.2010
No point showing error when we don't see the code.
Re: Vehicle ID problem -
knackworst - 20.10.2010
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);
Re: Vehicle ID problem -
randomkid88 - 20.10.2010
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.
Re: Vehicle ID problem -
knackworst - 20.10.2010
look I did exactly the same as option 2...
Re: Vehicle ID problem -
randomkid88 - 20.10.2010
No you didn't.
GetPlayerVehicleID, X, Y, Z
GetPlayerVehicleID
(playerid), X, Y, Z
Re: Vehicle ID problem -
knackworst - 20.10.2010
woops, thanks it works
Re: Vehicle ID problem -
randomkid88 - 20.10.2010
Your welcome
Re: Vehicle ID problem -
knackworst - 20.10.2010
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!!!!