[Ajuda] /VenderDinamite
#1

Entгo pessoal , preciso de ajuda com esse comando , quando vai vender dinamite fala que o player precisa estб dentro do Boxville .

PHP код:
if(strcmp(cmd"/venderdinamite"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13 || PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12)
            {
                new 
carid GetPlayerVehicleID(playerid);
                if(!
IsACaminhaozinhoCar(carid))
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк precisa estar dentro do BoxVille Para Vender Dinamites!");
                    return 
1;
                }
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USE: /venderdinamite [id]");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pMats] < 50)
                {
                    
SendClientMessage(playeridCOLOR_WHITE"INFO: Voce precisa ter mas de 50 de Materiais para vender Dinamites!");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                     {
                      if(
PlayerInfo[giveplayerid][pDina] >= 7)
                      {
                             
SendClientMessage(playeridCOR_HITMAN"INFO: O Player jб possui 7 Dinamites ele precisa usar elas para comprar mais!");
                             return 
1;
                       }
                       new 
carid1 GetPlayerVehicleID(giveplayerid);
                       if(!
IsACaminhaozinhoCar(carid1))
                       {
                        
SendClientMessage(playerid,COLOR_GRAD1,"O player para quem vocк vai vender precisa estar dentro do BoxVille!");
                        return 
1;
                        }
                        if(
giveplayerid == playerid)
                        {
                            
SendClientMessage(playeridCOLOR_GREY"Voce nao pode vender dinamites para si Mesmo!");
                            return 
1;
                        }
                        
GivePlayerMoney(giveplayerid, -500);
                        
GivePlayerMoney(playerid500);
                        
PlayerInfo[playerid][pMats] -= 50;
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
PlayerInfo[giveplayerid][pDina] += 1;
                        
SendClientMessage(giveplayerid,COR_VAGOS,"Voce Comprou uma Dinamite por R$1000 Boa Sorte!");
                        
format(string,sizeof(string),"Voce vendeu Dinamite para o Player %s.",giveplayer);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                        
format(string,sizeof(string),"*Mafioso [%s] Vendeu Dinamite para [%s]"sendername,giveplayer);
                        
ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        return 
1;
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   O Jogador Estб Offline !");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"Voce nao e membro de uma Mafia!");
                return 
1;
            }
        }
        return 
1;
    } 
PHP код:
public IsACaminhaozinhoCar(carid// Trocar e Pegar Materiais
{
    if((
carid == 175) || (carid == 176) || (carid == 181) || (carid == 182))
    {
        return 
true;
    }
    return 
0;

Reply
#2

PHP код:
if(strcmp(cmd"/venderdinamite"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if (
PlayerInfo[playerid][pMembro] == 13 || PlayerInfo[playerid][pLider] == 13 || PlayerInfo[playerid][pMembro] == 12 || PlayerInfo[playerid][pLider] == 12)
            {
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_WHITE"USE: /venderdinamite [id]");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pMats] < 50)
                {
                    
SendClientMessage(playeridCOLOR_WHITE"INFO: Voce precisa ter mas de 50 de Materiais para vender Dinamites!");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                     {
                      if(
PlayerInfo[giveplayerid][pDina] >= 7)
                      {
                             
SendClientMessage(playeridCOR_HITMAN"INFO: O Player jб possui 7 Dinamites ele precisa usar elas para comprar mais!");
                             return 
1;
                       }
                       new 
carid1 GetPlayerVehicleID(giveplayerid);
                       if(!
IsACaminhaozinhoCar(carid1))
                       {
                        
SendClientMessage(playerid,COLOR_GRAD1,"O player para quem vocк vai vender precisa estar dentro do BoxVille!");
                        return 
1;
                        }
                        if(
giveplayerid == playerid)
                        {
                            
SendClientMessage(playeridCOLOR_GREY"Voce nao pode vender dinamites para si Mesmo!");
                            return 
1;
                        }
                        
GivePlayerMoney(giveplayerid, -500);
                        
GivePlayerMoney(playerid500);
                        
PlayerInfo[playerid][pMats] -= 50;
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
PlayerInfo[giveplayerid][pDina] += 1;
                        
SendClientMessage(giveplayerid,COR_VAGOS,"Voce Comprou uma Dinamite por R$1000 Boa Sorte!");
                        
format(string,sizeof(string),"Voce vendeu Dinamite para o Player %s.",giveplayer);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                        
format(string,sizeof(string),"*Mafioso [%s] Vendeu Dinamite para [%s]"sendername,giveplayer);
                        
ProxDetector(30.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        return 
1;
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GREY"   O Jogador Estб Offline !");
                    return 
1;
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"Voce nao e membro de uma Mafia!");
                return 
1;
            }
        }
        return 
1;
    } 
Reply
#3

Hum, mais qual й o problema nisso? quer que tire essa mensagem?
Reply
#4

Quote:
Originally Posted by Delete_
Посмотреть сообщение
Hum, mais qual й o problema nisso? quer que tire essa mensagem?
Nгo , o problema й que o mafioso e o player fica de g no Boxville e mesmo assim aparece a mensagem dizendo que precisa estб no Boxville .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)