Posts: 202
Threads: 30
Joined: Jan 2017
How is possible to teleport a player if he's in a vehicle?I ve tried various scripts from the forum but no one worked.
Here is the code:
Код:
CMD:drift2( playerid, params[ ] ) return PlayerTele( playerid, "Drift2", "drift2",2265.3010,1399.5085,42.8203);
Posts: 33
Threads: 1
Joined: Jun 2014
Quote:
Originally Posted by Ilias_
How is possible to teleport a player if he's in a vehicle?I ve tried various scripts from the forum but no one worked.
Here is the code:
Код:
CMD:drift2( playerid, params[ ] ) return PlayerTele( playerid, "Drift2", "drift2",2265.3010,1399.5085,42.8203);
|
with his vehicle?
Posts: 202
Threads: 30
Joined: Jan 2017
Quote:
Originally Posted by shourya
with his vehicle?
|
yes....
Posts: 33
Threads: 1
Joined: Jun 2014
show me your PlayerTele function.
Posts: 202
Threads: 30
Joined: Jan 2017
Quote:
Originally Posted by saffierr
PHP код:
CMD:drift2(playerid, params[])
{
new vid = GetPlayerVehicleID(playerid);
SetPlayerPos(); // set player pos
SetPlayerVirtualWorld(); // set player vw
SetPlayerInterior(); // set player int
SetVehiclePos(vid, ); //
PutPlayerInVehicle(playerid, vid, 0); // put player in the vehicle
return 1;
}
Just a slight example.
|
it shows 3 errors
Код:
C:\Users\ilias_000\Desktop\Greek\gamemodes\Greek.pwn(27573) : error 055: start of function body without function header
C:\Users\ilias_000\Desktop\Greek\gamemodes\Greek.pwn(27574) : error 001: expected token: ";", but found "-identifier-"
C:\Users\ilias_000\Desktop\Greek\gamemodes\Greek.pwn(27580) : error 010: invalid function or declaration
Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
Remove or comment your other 'drift2' command and paste the one I made anywhere outside a callback.
Posts: 202
Threads: 30
Joined: Jan 2017
Quote:
Originally Posted by saffierr
Remove or comment your other 'drift2' command and paste the one I made anywhere outside a callback.
|
Thanks! it worked!
+rep