20.04.2013, 20:34
Sim, e para ajuda.
pawn Код:
public SetPlayerCriminal(playerid,declare,reason[])
{
if(IsPlayerConnected(playerid) && !IsACop(playerid))
{
if(WantedPoints[playerid] < 1500) WantedPoints[playerid] += 1;
PlayerInfo[playerid][pCrimes] += 1;
new turned[MAX_PLAYER_NAME];
new turner[MAX_PLAYER_NAME];
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
GetPlayerName(playerid, turned, sizeof(turned));
if (declare == 255)
{
format(turner, sizeof(turner), "Cвmeras de Seguranзa");
strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
}
else
{
if(IsPlayerConnected(declare))
{
GetPlayerName(declare, turner, sizeof(turner));
strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
}
}
format(gstring, sizeof(gstring), "Vocк cometeu um crime ( %s ). Relato: %s.",reason,turner);
SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
format(gstring, sizeof(gstring), "Nнvel de procurado: %d", WantedPoints[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, gstring);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
format(gstring, sizeof(gstring), "Todas as unidades:");
SendClientMessage(i, COLOR_LIGHTRED, gstring);
format(gstring, sizeof(gstring), "HQ - Denunciante: %s | Suspeito:{FF0000} %s",turner,turned);
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
format(gstring, sizeof(gstring), "HQ - Crime: {FF0000}%s | Localizaзгo: %s",reason,location);
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
if(GetPlayerInterior(playerid) == 0)
{
format(gstring, sizeof(gstring), "Interior: Nгo");
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
}
else
{
format(gstring, sizeof(gstring), "Interior: Sim");
SendClientMessage(i, TEAM_BLUE_COLOR, gstring);
}
}
}
}
}//not connected
}