23.12.2010, 02:35
hey guys i build a command to add sirens to cars but the remove command doesnt work im going to show youll both the add and the remove code
Quote:
if(strcmp(cmd, "/code3", true) == 0) { if(IsACop(playerid)) { new vehicleid; new siren; siren = CreateObject(18646, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); vehicleid = GetPlayerVehicleID(playerid); AttachObjectToVehicle(siren, vehicleid, 0.0, 0.0, GetVehicleHeightForSiren(vehicleid)+2, 0.0, 0.0, 0.0); } else SendClientMessage(playerid, LIGHTBLUE, "You may not use this Command!"); return 1; } if(strcmp(cmd, "/code1", true) == 0) { if(IsACop(playerid)) { DestroyObject(siren); } else SendClientMessage(playerid, LIGHTBLUE, "You may not use this Command!"); return 1; } |