Teleport command
#1

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);
Reply
#2

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?
Reply
#3

Quote:
Originally Posted by shourya
Посмотреть сообщение
with his vehicle?
yes....
Reply
#4

show me your PlayerTele function.
Reply
#5

PHP код:
CMD:drift2(playeridparams[])
{
    new 
vid GetPlayerVehicleID(playerid);
    
SetPlayerPos(); // set player pos
    
SetPlayerVirtualWorld(); // set player vw
    
SetPlayerInterior(); // set player int
    
SetVehiclePos(vid, ); // 
    
PutPlayerInVehicle(playeridvid0); // put player in the vehicle
    
return 1;

Just a slight example.
Reply
#6

Quote:
Originally Posted by saffierr
Посмотреть сообщение
PHP код:
CMD:drift2(playeridparams[])
{
    new 
vid GetPlayerVehicleID(playerid);
    
SetPlayerPos(); // set player pos
    
SetPlayerVirtualWorld(); // set player vw
    
SetPlayerInterior(); // set player int
    
SetVehiclePos(vid, ); // 
    
PutPlayerInVehicle(playeridvid0); // 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
Reply
#7

Remove or comment your other 'drift2' command and paste the one I made anywhere outside a callback.
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)