[Ajuda] comando
#1

Bom galera tentei passar um comando de OnPlayerCommandText para DOF2 e quando compilo o codigo
diz que o programa parou de funcionar

PHP код:
CMD:convidar(playeridparams[]);
{
    new 
idx;
    new 
tmp[128];
    if(
IsPlayerConnected(playerid))
    {
        
tmp strtok(cmd_convidaridx);
        if(!
strlen(tmp))
        {
            
SendClientMessage(playeridCOLOR_GREY"USE: /convidar [playerid/Parte-do-Nick]");
            return 
1;
        }
        new 
para1;
        
para1 ReturnUse(tmp);
        if(
Player[playerid][pLider] >= || Player[playerid][pCargo] == 5)
        {
            new 
lolz GetPlayerOrg(playerid);
            if(
TemVaga(lolz) == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"Nгo hб mais vagas na lista use /limparvaga primeiro.");
                return 
1;
            }
              if(
IsPlayerConnected(para1))
              {
                if(
Player[para1][pOrg] != || Player[para1][pLider] != 0)
                {
                    
SendClientMessage(playeridCOLOR_GREY"Este player Jб participa de Org/Gang/Mafia.");
                    return 
1;
                }
                if(
para1 != INVALID_PLAYER_ID)
                {
                      
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Convite enviado.");
                    
GetPlayerName(para1giveplayersizeof(giveplayer));
                    
GetPlayerName(playeridsendernamesizeof(sendername));
                    
format(string,sizeof(string),"{00FFFF}%s {FFFFFF}te convidou para ser um {00FFFF}%s.\n\n{FFFFFF}Para ser, clique em {00FF00}Sim.",sendername,GetOrgName(playerid));
                    
ShowPlayerDialog(para1,4710,DIALOG_STYLE_MSGBOX,"Convite",string,"Sim","Nao");
                    
InviteOffer[para1] = playerid;
                    
InviteJob[para1] = lolz;
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"   Somente lнderes podem usar este comando !");
        }
    }
    return 
1;

Reply


Messages In This Thread
comando - by Feconito - 14.01.2019, 21:24
Re: comando - by Feconito - 14.01.2019, 21:53
Re: comando - by GSantana - 14.01.2019, 22:40
Re: comando - by ipsLuan - 14.01.2019, 23:05
Re: comando - by Feconito - 14.01.2019, 23:07

Forum Jump:


Users browsing this thread: 1 Guest(s)