26.08.2014, 16:20
Hola bueno resulta que este comando funciona a medias o incorrectamente, AL ponerle cargos al player y alejarse un poco se bugea el cp del minimapa y tambien cuando le ponen cargos a alguien todos los usuarios ven ese color, cuando solo la faccion de SAPD tendria que verlo.
Ayuda:
Ayuda:
Код:
CMD:c(playerid, params[]){
new string[170];
new cargos[MAX_PLAYER_NAME];
new cargos2[MAX_PLAYER_NAME];
if(!IsACop(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "No puedes usar este comando.");
if(OnDuty[playerid] == 0 && IsACop(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "No estas en servicio.");
if(!sscanf(params,"ii", params[0], params[1]))
{
GetPlayerName(params[0], cargos, sizeof(cargos));
GetPlayerName(playerid, cargos2, sizeof(cargos2));
switch(params[1])
{
case 0:
{
Info[params[0]][pWantedLevel] = 0;
SetPlayerWantedLevel(params[0], 0);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c0_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}tiene todo en orden, lo dejo continuar {F6FF00}(0)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
case 1:
{
format(string, sizeof(string), "La policнa desea hablar contigo,si intentas escapar,serбs arrestado.");
SendClientMessageEx(params[0], COLOR_WHITE, string);
Info[params[0]][pWantedLevel] = 1;
SetPlayerWantedLevel(params[0], 1);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c1_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}parece sospechoso, voy a interrogarlo {F6FF00}(1)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
case 2:
{
format(string, sizeof(string), "Te escapaste, ahora toda la policia te buscarб.");
SendClientMessageEx(params[0], COLOR_WHITE, string);
Info[params[0]][pWantedLevel] = 2;
SetPlayerWantedLevel(params[0], 2);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c2_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}se resistiу al arresto, procedemos a persecuciуn {F6FF00}(2)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
case 3:
{
Info[params[0]][pWantedLevel] = 3;
SetPlayerWantedLevel(params[0], 3);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c3_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}se encuentra armado, procedan con precauciуn {F6FF00}(3)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
case 4:
{
Info[params[0]][pWantedLevel] = 4;
SetPlayerWantedLevel(params[0], 4);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c4_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}abriу fuego, necesito refuerzos {F6FF00}(4)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
case 5:
{
Info[params[0]][pWantedLevel] = 5;
SetPlayerWantedLevel(params[0], 5);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c5_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}asesinу, detener vivo o muerto {F6FF00}(5)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
case 6:
{
Info[params[0]][pWantedLevel] = 6;
SetPlayerWantedLevel(params[0], 6);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c6_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}es extremadamente peligroso, disparen a matar {F6FF00}(6)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
}
}
}
else SendClientMessage(playerid, -1, "Utiliza: /c [id] [0-6]");
return 1;
}
forward Policia(member, color, string[]);
public Policia(member, color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
SendClientMessage(i, color, string);
}
}
}
}

