[Ajuda] Gangzone por Бrea
#2

Acredito que isso que fiz jб й uma boa base para comeзar.

PHP код:
new GZ;
//Quando a GangZone for criada, ou iniciar uma dominaзгo
GZ GangZoneCreate(1248.0112072.8041439.3482204.319);
VerificarGZ();
forward VerificarGZ(); 
public 
VerificarGZ() {
    static 
contStr[35];
    for(new 
i!= MAX_PLAYERSi++) {
        
// No lugar de 1248.011, 2072.804, 1439.348, 2204.319, coloque as suas coordenadas
        
if(IsPlayerConnected(i) && IsPlayerInArea(i1248.0112072.8041439.3482204.319) && /*Variбvel da org inimiga Ex:*/ PlayerInfo[playerid][Membro] == ORG_INIMIGAcont++;
    }
    if(
cont >= 3) {
        for(new 
i!= MAX_PLAYERSi++) {
            if(
IsPlayerConnected(i) && /*Variбvel da org que irб receber a mensagem Ex:*/ PlayerInfo[playerid][Membro] == ORG_ALIADA) {
                
format(Str35"Possui %i inimigos na sua бrea."cont);
                
SendClientMessage(i, -1Str);
            }
        }
    }
    
cont 0;
    
SetTimer("VerificarGZ"1000false);
    return 
1;
}
IsPlayerInArea(playeridFloat:MinXFloat:MinYFloat:MaxXFloat:MaxY) {
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    if(
>= MinX && <= MaxX && >= MinY && <= MaxY) return 1;
    return 
0;

Reply


Messages In This Thread
Gangzone por Бrea - by Caiton - 27.12.2015, 02:24
Re: Gangzone por Бrea - by EditPawn - 27.12.2015, 02:53
Re: Gangzone por Бrea - by Caiton - 27.12.2015, 16:58
Re: Gangzone por Бrea - by EditPawn - 27.12.2015, 22:38
Re: Gangzone por Бrea - by Caiton - 28.12.2015, 00:36
Re: Gangzone por Бrea - by EditPawn - 28.12.2015, 01:38
Re: Gangzone por Бrea - by Caiton - 28.12.2015, 03:04
Re: Gangzone por Бrea - by Caiton - 29.12.2015, 18:06
Re: Gangzone por Бrea - by Caiton - 09.06.2017, 18:35
Re: Gangzone por Бrea - by RodrigoMSR - 09.06.2017, 21:09

Forum Jump:


Users browsing this thread: 1 Guest(s)