[AJUDA] Zone
#1

Galera eu queria saber como eu coloca pra quando o cara entrar na areadm ganhar armas, area dm:

pawn Код:
public areadm()
{
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i)) {
//Scores
new aname[MAX_PLAYER_NAME];
new playerid;
new plid;
GetPlayerName(i, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
SetPlayerScore(i,dini_Int(file, "Level"));
if(IsPlayerInPlace(i,2016.010986, -1161.922363, 2324.010986, -923.518310)){
DMLiberado2[i] = 1;
GangZoneFlashForAll(favela,0xFFFFFFAA);
} else {
if(DMLiberado2[i] == 1){
DMLiberado2[i] = 0;
GangZoneStopFlashForAll(favela);
}
if(IsPlayerInPlace(i,1267.535, 2084.409, 1408.109, 2235.263)){
DMLiberado2[i] = 1;
GangZoneFlashForAll(areadmlv,0xFFFFFFAA);
} else {
if(DMLiberado2[i] == 1){
DMLiberado2[i] = 0;
GangZoneStopFlashForAll(areadmlv);
}
}
}
}
}
}
Armas:
pawn Код:
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 26, 999999);
GivePlayerWeapon(playerid, 28, 999999);
GivePlayerWeapon(playerid, 24, 999999);
GivePlayerWeapon(playerid, 31, 999999);
GivePlayerWeapon(playerid, 34, 999999);
Reply
#2

Tenta assim

PHP код:
public areadm()
{
for(new 
i=0i<MAX_PLAYERSi++){
if(
IsPlayerConnected(i)) {
//Scores
new aname[MAX_PLAYER_NAME];
new 
playerid;
new 
plid;
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid26999999);
GivePlayerWeapon(playerid28999999);
GivePlayerWeapon(playerid24999999);
GivePlayerWeapon(playerid31999999);
GivePlayerWeapon(playerid34999999);
GetPlayerName(ianameMAX_PLAYER_NAME);
format(filesizeof(file), PASTA_CONTASaname);
SetPlayerScore(i,dini_Int(file"Level"));
if(
IsPlayerInPlace(i,2016.010986, -1161.9223632324.010986, -923.518310)){
DMLiberado2[i] = 1;
GangZoneFlashForAll(favela,0xFFFFFFAA);
} else {
if(
DMLiberado2[i] == 1){
DMLiberado2[i] = 0;
GangZoneStopFlashForAll(favela);
}
if(
IsPlayerInPlace(i,1267.5352084.4091408.1092235.263)){
DMLiberado2[i] = 1;
GangZoneFlashForAll(areadmlv,0xFFFFFFAA);
} else {
if(
DMLiberado2[i] == 1){
DMLiberado2[i] = 0;
GangZoneStopFlashForAll(areadmlv);
}
}
}
}
}

Reply
#3

Nгo deu Deagle, eu entro na favela mais nгo ganho as armas....
Reply
#4

Quote:
Originally Posted by GuiihCamargo
Посмотреть сообщение
Nгo deu Deagle, eu entro na favela mais nгo ganho as armas....
tenta assim:

pawn Код:
public areadm()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            //Scores
            new aname[MAX_PLAYER_NAME];
            new playerid;
            new plid;
           
            GetPlayerName(i, aname, MAX_PLAYER_NAME);
            format(file, sizeof(file), PASTA_CONTAS, aname);
            SetPlayerScore(i,dini_Int(file, "Level"));
            if(IsPlayerInPlace(i,2016.010986, -1161.922363, 2324.010986, -923.518310))
                {
                    DMLiberado2[i] = 1;
                    GangZoneFlashForAll(favela,0xFFFFFFAA);
                    ResetPlayerWeapons(playerid);
                    GivePlayerWeapon(playerid, 26, 999999);
                    GivePlayerWeapon(playerid, 28, 999999);
                    GivePlayerWeapon(playerid, 24, 999999);
                    GivePlayerWeapon(playerid, 31, 999999);
                    GivePlayerWeapon(playerid, 34, 999999);
                }
                else
                    {
                    if(DMLiberado2[i] == 1)
                        {
                            DMLiberado2[i] = 0;
                            GangZoneStopFlashForAll(favela);
                        }
                        if(IsPlayerInPlace(i,1267.535, 2084.409, 1408.109, 2235.263))
                            {
                            DMLiberado2[i] = 1;
                            ResetPlayerWeapons(playerid);
                            GivePlayerWeapon(playerid, 26, 999999);
                            GivePlayerWeapon(playerid, 28, 999999);
                            GivePlayerWeapon(playerid, 24, 999999);
                            GivePlayerWeapon(playerid, 31, 999999);
                            GivePlayerWeapon(playerid, 34, 999999);
                            GangZoneFlashForAll(areadmlv,0xFFFFFFAA);
                            }
                            else
                                {
                                    if(DMLiberado2[i] == 1)
                                    {
                                        DMLiberado2[i] = 0;
                                        GangZoneStopFlashForAll(areadmlv);
                                    }
                                }
                    }
                           
        }
    }
}
Mano, axo q se vc identasse o seu codigo ficaria bem mais facio pro pessoal do forum.
Reply
#5

pawn Код:
public areadm()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            //Scores
            new aname[MAX_PLAYER_NAME];
            new playerid;
            new plid;
            GetPlayerName(i, aname, MAX_PLAYER_NAME);
            format(file, sizeof(file), PASTA_CONTAS, aname);
            SetPlayerScore(i,dini_Int(file, "Level"));

            if(IsPlayerInPlace(i,2016.010986, -1161.922363, 2324.010986, -923.518310))
            {
                DMLiberado2[i] = 1;
                GangZoneFlashForAll(favela,0xFFFFFFAA);
                ResetPlayerWeapons(i);
                GivePlayerWeapon(i, 26, 999999);
                GivePlayerWeapon(i, 28, 999999);
                GivePlayerWeapon(i, 24, 999999);
                GivePlayerWeapon(i, 31, 999999);
                GivePlayerWeapon(i, 34, 999999);
            }
            else
            {
                if(DMLiberado2[i] == 1)
                {
                    DMLiberado2[i] = 0;
                    GangZoneStopFlashForAll(favela);
                }
                if(IsPlayerInPlace(i,1267.535, 2084.409, 1408.109, 2235.263))
                {
                    DMLiberado2[i] = 1;
                    GangZoneFlashForAll(areadmlv,0xFFFFFFAA);
                }
                else
                {
                    if(DMLiberado2[i] == 1)
                    {
                        DMLiberado2[i] = 0;
                        GangZoneStopFlashForAll(areadmlv);
                    }
                }
            }
        }
    }
}
Teste ai, tenho quase certeza que vai funcionar.
Reply
#6

Isso nгo vai dar armas pra todos? q tiverem na favela? ex se tiver jб 2 pessoas, e eu entrar, nгo vai dar pra todos? tem um loop ali '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)