01.03.2016, 07:51
Well, The parameters is wrong so take a look at wiki
https://sampwiki.blast.hk/wiki/CreateVehicle
Example:
https://sampwiki.blast.hk/wiki/CreateVehicle
Example:
PHP код:
public OnGameModeInit ()
{
vehicle_id = CreateVehicle(596, 0.0, 0.0, 15.0, 90.0, 5, 0, 120); // I change this
vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
//Creating the Vehicle
//Attaching Text Label To Vehicle
Attach3DTextLabelToVehicle( vehicle3Dtext[ vehicle_id ] , vehicle_id, 0.0, 0.0, 2.0);
Create3DTextLabel("I'm at the coordinates:\n30.0, 40.0, 50.0", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
return 1;
}
Quote:
modelid The model for the vehicle. Float:X The X coordinate for the vehicle. // 596 Float:Y The Y coordinate for the vehicle. // 0.0 Float:Z The Z coordinate for the vehicle. // 0.0 Float:angle The facing angle for the vehicle. // 90.0 color1 The primary color ID. // 5 color2 The secondary color ID. // 0 respawn_delay The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning. // 120 addsiren Added in 0.3.7; will not work in earlier versions. Has a default value 0. Enables the vehicle to have a siren, providing the vehicle has a horn. // no need, because it has a default value 0. |