Certain Object per Certain vehicle model
#2

Using 0.3e RC6;
pawn Код:
COMMAND:siren(playerid, params[])
{
    if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "You must be the driver of a vehicle to use this command.");
    new objectid, vehicleid, Float:x, Float:y, Float:z;
    vehicleid = GetPlayerVehicleID(playerid);
    GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, x, y, z);
    objectid = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, floatadd(floatdiv(z, 2.0), 0.05), 0.0, 0.0, 0.0)
    return 1;
}
This gave me a chance to try GetVehicleModelInfo. Seems to work great.
Reply


Messages In This Thread
Certain Object per Certain vehicle model - by Abreezy - 05.04.2012, 04:00
Re: Certain Object per Certain vehicle model - by Psymetrix - 05.04.2012, 04:22
Re: Certain Object per Certain vehicle model - by Abreezy - 05.04.2012, 04:41
Re: Certain Object per Certain vehicle model - by Psymetrix - 05.04.2012, 04:55

Forum Jump:


Users browsing this thread: 1 Guest(s)