03.03.2014, 09:34
Hi. Yesterday i make a command, called /siren1. This command attach a siren to a vehicle. I try to edit the position of the siren in-game, but i can't. (EditObject - function) I make a video to show you that.
https://www.youtube.com/watch?v=E-MbVHh2S5k
I apologize for my English
https://www.youtube.com/watch?v=E-MbVHh2S5k
Код:
COMMAND:siren1(playerid,params[]) { if(InCopCar(playerid) && IsLaw(playerid) && duty[playerid] == 1) { new veh = GetPlayerVehicleID(playerid); if(!vehicle_siren_state[veh]) { vehicle_siren_object[veh] = CreateObject(19419, 10.0, 10.0, 10.0, 0, 0, 0); vehicle_siren_state[veh] = 1; AttachObjectToVehicle(vehicle_siren_object[veh], veh, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0); EditObject(playerid, vehicle_siren_object[veh]); return 1; } else { DestroyObject(vehicle_siren_object[veh]); vehicle_siren_state[veh] = 0; return 1; } } else { SendClientMessage(playerid,COLOR_LIGHTRED,"Nu esti intr-o masina de politie sau nu esti duty."); return 1; } }