29.04.2012, 21:07
Quote:
This is my command:
Код:
if (strcmp("/siren", cmdtext, true, 6) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You must be in a vehicle to use this command!"); new object = CreateDynamicObject(18646,0,0,-1000,0,0,0,100); AttachObjectToVehicle(object, GetPlayerVehicleID(playerid), -0.300000,0.000000,0.749999,0.000000,0.000000,0.000000); return 1; } |
pawn Код:
new objectid = CreateObject(...); // your own createObject
new vehicleid = GetPlayerVehicleID(playerid); // put the vehicle id in vehicleid variable
AttachObjectToVehicle(objectid, vehicleid, fx, fy, fz,frx, fry, frz); // and finally attachs to the vehicle.