Vehicle TP
#8

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Alright, that's not the same thing. You want script something. I will try to help you then.

PHP код:
#define COLOR_RED 0xff0000FF // We define COLOR_RPutPlayerInVehicleED as an hexadecimal color (red)
#define COLOR_GREEN 0x33cc33FF // We define COLOR_GREEN as an hexadecimal color (green)
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/tp"cmdtexttrue) == 0// If the player type /tp than we executes thos following lines
    
{
        if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_RED"You must be in a vehicle!"); // If the player isn't in a vehicle then we return an error message! The command stopping here if the player isn't in a vehicle
        
vehicleid GetPlayerVehicleID(playerid); // We get back the ID of player's vehicle (useful for later)
        
SetVehiclePos(vehicleidxyz);
/*We set the vehicle at the coordinates x, y, z. You HAVE TO CHANGE x, y, z by coordinates like -1964.8184, 253.4444, 47.7031 (Wangs Car roof)*/
        
PutPlayerInVehicle(playeridvehicleid0);
/*We put the player in the vehicle at the seat 0. Why? Seat = driver0 - Driver
1 - Front passenger
2 - Back-left passenger
3 - Back-right passenger
4+ - Passenger seats (coach etc.)*/
        
SendClientMessage(playeridCOLOR_GREEN"You have been teleported!"); // We send a basic message to say the player has been teleported
        
return 1;
    }
    return 
0;


I want to do CreateVehicle Be4 That cmd and a new Vehicle pos will be GetPlayerPos Then SetVehiclePos I think it will be with New X Y Z it's back to GetPlayerPos then PutPlayerInVehicle.






I want to know how to +Rep u guys u helped me alot
Reply


Messages In This Thread
Vehicle TP - by oktokt1 - 05.05.2016, 23:03
Re: Vehicle TP - by Dayrion - 05.05.2016, 23:32
Re: Vehicle TP - by oktokt1 - 06.05.2016, 07:40
Re: Vehicle TP - by Sew_Sumi - 06.05.2016, 08:19
Re: Vehicle TP - by Dayrion - 06.05.2016, 09:19
Re: Vehicle TP - by Sew_Sumi - 06.05.2016, 11:50
Re: Vehicle TP - by Dayrion - 06.05.2016, 12:05
Re: Vehicle TP - by oktokt1 - 06.05.2016, 13:33
Re: Vehicle TP - by Dayrion - 06.05.2016, 14:18
Re: Vehicle TP - by Sew_Sumi - 06.05.2016, 14:24

Forum Jump:


Users browsing this thread: 2 Guest(s)