It tells you.
pawn Код:
(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay)
pawn Код:
CreateVehicle(520, X, Y, Z, ANGLE, COLOR1, COLOR2, RESPAWN);
Here is an example.
pawn Код:
CreateVehicle(411, 0.0, 0.0, 0.0, 10.0, 0, 0, 10);
That will create an Infernus, the Infernus will be spawned in the middle of San Andreas somewhere, the angle is 10.0, the color will be Black and if you exit the Infernus it will be re-spawned within 10 seconds.
This is a way to make a vehicle only be accessible via PlayerName
pawn Код:
Mimic = CreateVehicle(modelid, X, Y, Z, ANGLE, COLOR1, COLOR2, RESPAWN); // edit this ofc
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(playerid);
if(vehicle == Mimic)
{
if(strcmp(PlayerName,"Mimic",true))
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, YOURCOLOR, "You are not allowed to enter this vehicle");
}
}
}