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(playerid, cmdtext[])
{
if (strcmp("/tp", cmdtext, true) == 0) // If the player type /tp than we executes thos following lines
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_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(vehicleid, x, y, z);
/*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(playerid, vehicleid, 0);
/*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(playerid, COLOR_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