[AJUDA] autorizaзгo
#1

Galera tenho esse sitema de autorizaзгo quero botar se o player ja tiver autorizaзгo nao pegar outra e aparecer (vc ja tem uma autorizaзгo)

pawn Код:
if (strcmp(cmd, "/autorizacao", true) == 0)
    {
        if(PlayerInfo[playerid][pEmprego] == 2)
        {
            new name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            if(PlayerToPoint(2.0, playerid, 255.5271,82.2452,1002.4453) || PlayerToPoint(2.0, playerid, 188.2691,179.2728,1003.0234) || PlayerToPoint(2.0, playerid, 216.3728,117.1501,999.0156))
            {
                if(playerid != INVALID_PLAYER_ID)
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Vocк comprou uma licenзa para liberar um preso -R$200.");
                    GivePlayerMoney(playerid, -200);
                    ApprovedAdvogado[playerid] = 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um Advogado");
        }
        return 1;
    }
Reply
#2

pawn Код:
if(ApprovedAdvogado[playerid] == 1) return SendClientMessage(playerid,-1,"Vocк ja tem uma autorizaзгo!");
Reply
#3

PHP код:
    if (strcmp(cmd"/autorizacao"true) == 0)
    {
        if(
PlayerInfo[playerid][pEmprego] == 2)
        {
            new 
name[MAX_PLAYER_NAME];
            
GetPlayerName(playeridnamesizeof(name));
            if(
PlayerToPoint(2.0playerid255.5271,82.2452,1002.4453) || PlayerToPoint(2.0playerid188.2691,179.2728,1003.0234) || PlayerToPoint(2.0playerid216.3728,117.1501,999.0156))
            {
                if(
ApprovedAdvogado[playerid] == 1)
                {
                    if(
playerid != INVALID_PLAYER_ID)
                    {
                        
SendClientMessage(playeridCOLOR_LIGHTBLUE,"Vocк comprou uma licenзa para liberar um preso -R$200.");
                        
GivePlayerMoney(playerid, -200);
                        
ApprovedAdvogado[playerid] = 1;
                    }
                }
                else
                {
                    
SendClientMessage(playerid,-1,"Vocк ja tem uma autorizaзгo!");
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"Vocк nгo й um Advogado");
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)