25.07.2014, 20:29
PHP код:
forward vendeu(playerid);
public vendeu(playerid)
{
new Name[24], targetid, location[MAX_ZONE_NAME], Msg[128];
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
new Float:PosX, Float:PosY, Float:PosZ;
GetPlayerPos(playerid, PosX, PosY, PosZ);
if(IsPlayerInRangeOfPoint(i, 500.0, PosX, PosY, PosZ) && APlayerData[i][PlayerClass] == ClassPolice)
{
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayer2DZone(targetid, location, MAX_ZONE_NAME);
format(Msg, 128, "{FFFFFF}%s {0000FF}esta vendendo drogas em{ffffff}%s", Name, location);
Police_SendMessage(Msg);
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
APlayerData[playerid][PoliceCanJailMe] = true;
}
}
}
return 1;
}