01.07.2014, 16:42
Hola gente tengo unos comandos que se comparte entre facciones por ejemplo: /luces que lo poseen las facciones sapd y fbi Yo quiero saber como dejar ese comando solo para SApd:
Acб el comando:
Acб el comando:
Код:
CMD:luces(playerid, params[]) { if(Team_SAPD(playerid) || Team_FBI(playerid)){ if(IsPlayerInAnyVehicle(playerid)){ new vehicleid = GetPlayerVehicleID(playerid); if(!LSPD_IsACopCar(vehicleid) && !FBI_Vehicle(vehicleid)) return SendClientMessageEx(playerid, -1, "Debes estar en un vehiculo de SAPD o FBI."); if(Lamp[vehicleid] == 0) { for(new i=0; i<sizeof(Offsets); i++){ if(Offsets[i][getID] == 560 && GetVehicleModel(vehicleid) == 560) { Lamp[vehicleid] = 1; SendClientMessageEx(playerid, -1, "Luces activadas correctamente."); light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 415 && GetVehicleModel(vehicleid) == 415){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 421 && GetVehicleModel(vehicleid) == 421){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 426 && GetVehicleModel(vehicleid) == 426){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 579 && GetVehicleModel(vehicleid) == 579){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 402 && GetVehicleModel(vehicleid) == 402){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 461 && GetVehicleModel(vehicleid) == 461){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 521 && GetVehicleModel(vehicleid) == 521){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } if(Offsets[i][getID] == 506 && GetVehicleModel(vehicleid) == 506){ Lamp[vehicleid] = 1; light[vehicleid] = CreateObject(18646,Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 96.0); AttachObjectToVehicle(light[vehicleid], vehicleid, Offsets[i][vvvX], Offsets[i][vvvY], Offsets[i][vvvZ], 0.0, 0.0, 0.0); return 1; } } SendClientMessageEx(playerid, -1, "ERROR: Modelos compatibles:"); return SendClientMessageEx(playerid, -1, "Sultan, Cheetah, Washington, Premier, Huntley, Buffalo, PCJ 600, FCR 900, Super Gt"); } else { DestroyObject(light[vehicleid]); Lamp[vehicleid] = 0; SendClientMessageEx(playerid, -1, "Luces desactivadas correctamente."); return 1; } } else return SendClientMessageEx(playerid, -1, "Debes estar en un vehiculo."); } else SendClientMessageEx(playerid, -1, "No puedes usar este comando. (No eres Agente)"); return 1; }