25.01.2013, 11:16
(
Последний раз редактировалось NuTShoT; 26.01.2013 в 23:16.
)
@RESOLVIDO +rep A TODOS
giveplayerid = ReturnUser(tmp);
new result[64];
if(IsPlayerConnected(giveplayerid))
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oficial %s Limpou a Ficha de %s Motivo %s.", PlayerName(playerid), giveplayer, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Vocк limpou a ficha de %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oficial %s Limpou Sua Ficha.", PlayerName(playerid));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oficial %s Limpou a Ficha de %s Motivo %s.", PlayerName(playerid), giveplayer, (result));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
if(strcmp(cmd, "/limpar", true) == 0 || strcmp(cmd, "/limparficha", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return true;
}
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return true;
}
new member = PlayerInfo[playerid][pMembro];
new lider = PlayerInfo[playerid][pLider];
new rank = PlayerInfo[playerid][pCargo];
if((gTeam[playerid] == 2 || 1 || 3))
{
if (!PlayerToPoint(3.0, playerid, 253.9280,69.6094,1003.6406) && !PlayerToPoint(3.0, playerid, 198.9671,168.1982,1003.0234) && !PlayerToPoint(3.0, playerid, 234.8419,111.2194,1003.2257) && !PlayerToPoint(3.0, playerid, 326.8282,304.4166,999.1484) && !PlayerToPoint(3.0, playerid, 699.6252,-553.2016,-3.5950))
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo estб na recepзгo do Departamento de Policia !");
return true;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limpar [playerid/PartOfName] [Motivo]");
return true;
}
giveplayerid = ReturnUser(tmp);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limpar [playerid/PartOfName] [Motivo]");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo limpar sua prуpria ficha!"); return true; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Vocк limpou a ficha de %s motivo: %s.", giveplayer, (result));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oficial %s Limpou a Ficha motivo: %s.", PlayerName(playerid), (result));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
WantedPoints[giveplayerid] = 0;
SetPlayerWantedLevel(giveplayerid, 0);
ClearCrime(giveplayerid);
if(gTeam[giveplayerid]==4)
{
gTeam[giveplayerid] = 3;
SetPlayerToTeamColor(giveplayerid);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Invalido ID/NICK!");
}
}
}
return true;
}