[Ajuda] Qualquer player consegue roubar os cofres..
#1

PHP Code:
if(strcmp(cmd"/roubar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerToPoint(1.0,playerid354.9906,172.3177,1008.3794))
            {
                if(
JaEstaRoubando[playerid] == 1)
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк ja estб roubando!");
                    return 
true;
                }
                if(
storeexit[playerid] == 1717)// Pref LS (Commerce)
                
{
                    if(
TemGenteRoubandoLS == 1)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Alguem ja roubou este local recentemente");
                        return 
true;
                    }
                    
SetTimer("RouboPrefLS"4000000);
                     
SetPlayerPos(playerid354.9906,172.3177,1008.3794);
                    
SetPlayerFacingAngle(playerid93.9411);
                    
JaEstaRoubando[playerid] = 1;
                    
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",1.0,1,0,0,0,0);
                    
SetTimerEx("AnimRoubo"5000"i"playerid);
                    
temporoubo[playerid] = SetTimerEx("RouboPref"600000"i"playerid);
                    
TemGenteRoubandoLS 1;
                    
format(stringsizeof(string), "[ROUBO] %s (ID: %d) estб tentando roubar o cofre da prefeitura de (Commerce - LS)!"PlayerName(playerid), playerid);
                    
SendClientMessageToAll(COLOR_DBLUEstring);
                    
SendClientMessage(playeridCOLOR_YELLOW"Espere 1 minuto para roubar. USE: /parar para cancelar!");
                    
SetPlayerCriminal(playerid,255,"tentativa de roubo");
                    
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",1.0,1,0,0,0,0);
                    return 
true;
                } 
Qualquer play consegue roubar os cofres, ajudem a colocar para apenas esses id de orgs consigam roubar:

Orgs que eu queria que sу elas roubassem:

ID: 5,14,17,18,19,21

Obrigado a quem me ajudar..
Reply
#2

Bota a definiзao da org EX:
pawn Code:
if(Player[playeri][pOrg] == 5)
{
 // a funзao do roubo
 return true;
}


@Edit definiзao do lider e membros !
Reply
#3

Sou novato nisto, teria como detalhar mais?
Reply
#4

PHP Code:
if(strcmp(cmd"/roubar"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerToPoint(1.0,playerid354.9906,172.3177,1008.3794))
            {
                if(
PlayerInfo[playerid][pOrg] == || PlayerInfo[playerid][pOrg] == 14
                
{
                    if(
JaEstaRoubando[playerid] == 1)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Vocк ja estб roubando!");
                        return 
true;
                    }
                    if(
storeexit[playerid] == 1717)// Pref LS (Commerce)
                    
{
                    if(
TemGenteRoubandoLS == 1)
                    {
                        
SendClientMessage(playeridCOLOR_GRAD1"Alguem ja roubou este local recentemente");
                        return 
true;
                    }
                    
SetTimer("RouboPrefLS"4000000);
                    
SetPlayerPos(playerid354.9906,172.3177,1008.3794);
                    
SetPlayerFacingAngle(playerid93.9411);
                    
JaEstaRoubando[playerid] = 1;
                    
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",1.0,1,0,0,0,0);
                    
SetTimerEx("AnimRoubo"5000"i"playerid);
                    
temporoubo[playerid] = SetTimerEx("RouboPref"600000"i"playerid);
                    
TemGenteRoubandoLS 1;
                    
format(stringsizeof(string), "[ROUBO] %s (ID: %d) estб tentando roubar o cofre da prefeitura de (Commerce - LS)!"PlayerName(playerid), playerid);
                    
SendClientMessageToAll(COLOR_DBLUEstring);
                    
SendClientMessage(playeridCOLOR_YELLOW"Espere 1 minuto para roubar. USE: /parar para cancelar!");
                    
SetPlayerCriminal(playerid,255,"tentativa de roubo");
                    
ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",1.0,1,0,0,0,0);
                    }
                    return 
true;
                } 
Reply
#5

pegue o exemplo do carinha acima e coloque a org ou profissгo que poderб roubar o banco
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)