30.04.2011, 12:35
I have created some private vehicles using this codes:
so now i need a command that will teleport the player's private vehicle to him when he type /telemycar
how to make this command? :/
Код:
vls = AddStaticVehicle(468,-2622.9917,2286.4600,7.8810,357.9488,0,0);
Код:
new terryw[24]; // We create a variable which will contain the players name. GetPlayerName(playerid, terryw, sizeof(terryw)); // We use GetPlayerName to store the name in 'PlayerName'. if(newstate == PLAYER_STATE_DRIVER) // Check the new state, since he's the driver in this case, we continue. { new Vehicle = GetPlayerVehicleID(playerid); // This saves the player's vehicle id into the variable 'vehicle' if(Vehicle == vls) // We check if the vehicle is the one we don't want everyone to enter { // It is, so we continue. if(strcmp(terryw,"vls",true)) // We use strcmp to check if the player who entered the car is the same as 'Matthias' { RemovePlayerFromVehicle(playerid); // It's not, so we remove the player from the car. SendClientMessage(playerid, 0x33AA33AA, "This is only for vls"); // And we inform him about why he got removed from the car. } } }
how to make this command? :/