03.02.2012, 19:02
Vou pegar aqui, jб jб posto.
pawn Код:
#define MAX_PIX 100
#define GRANA_PIX 4
new GranaPix[MAX_PLAYERS];
new NumPix[MAX_PLAYERS];
new Text3D:PixLabel[MAX_PIX];
enum PixInfo
{
Dono,
Float:PixX,
Float:PixY,
Float:PixZ
};
new bool:Pixando[MAX_PLAYERS];
if(Pixando[playerid] == false && IsAGang(playerid) && GetPlayerWeapon(playerid) == 41 && (newkeys & KEY_FIRE ) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
for(new i = 0; i < MAX_PIX; i ++)
{
if(PlayerToPoint(3.0, playerid,Pixacao[i][PixX],Pixacao[i][PixY],Pixacao[i][PixZ]))
{
Pixando[playerid] = true;
new wep,ammo;
GetPlayerWeaponData(playerid, 9, wep, ammo);
SetTimerEx("GetAmmo",3500,false, "iiiii", playerid,9,wep,ammo,i);
}
}
}
Pixando[playerid] = false;
public GranaTerritorios()
{
new string[128];
for(new i=0; i< sizeof(TurfsCoords); i++)
{
if(gZonesData[i][ZoneOwner] != TEAM_NONE)
{
for(new x = 0; x <= HighestID; x ++)
{
if(IsPlayerConnected(x))
{
if(Player[x][pMember] == gZonesData[i][ZoneOwner])
{
if(Player[x][pMember] == 16 || Player[x][pMember] == 17)
{
format(string, sizeof(string), "[INFO] Vocк recebeu R$150,00 e 100 materiais, por manter a бrea %s sob controle.", TURF_PAYOUT, TurfsCoords[i][zName]);
Player[x][pMats] += 100;
GivePlayerGP(x, 150);
}
else
{
format(string, sizeof(string), "[INFO] Vocк recebeu R$%d,00 por manter a бrea %s sob controle.", TURF_PAYOUT, TurfsCoords[i][zName]);
GivePlayerGP(x, 100);
}
SendClientMessage(x, COLOR_GOLD, string);
}
}
GranaPix[x] = 0;
NumPix[x] = 0;
}
}
}
for(new x = 0; x <= HighestID; x ++)
{
for(new i = 0; i < MAX_PIX; i ++)
{
if(IsPlayerConnected(x))
{
if(Player[x][pMember] == Pixacao[i][Dono] && Pixacao[i][Dono] != 0)
{
GranaPix[x] += GRANA_PIX;
NumPix[x] ++;
}
}
}
if(NumPix[x] > 0)
{
format(string, sizeof(string), "[INFO] Vocк recebeu R$%d, por manter %d pixaзхes sob seu domнnio.", GranaPix[x], NumPix[x]);
GivePlayerGP(x, GranaPix[x]);
SendClientMessage(x, COLOR_GOLD, string);
}
}
}