Help dialog compare String
#4

Quote:
Originally Posted by GXLZPGX
Посмотреть сообщение
GetPlayerName instead of PlayerName, also you should store strings locally in a new variable in case you need to re-use the string.

PHP код:
if(dialogid == 590){
        new 
Name1[MAX_PLAYER_NAME];
        
//string for players name
        
new Name2[MAX_PLAYER_NAME];
        
GetPlayerNameplayeridName2sizeof(Name2) );
        new 
orgid fmembro[playerid];
        if(!
response) return true;
        switch( 
listitem ) {
            
//sizeof automatically retrieves max array size of string
            
case 0format(Name1sizeof(Name1), "%s"FactionInfo[orgid][lider1]);
            case 
1format(Name1sizeof(Name1), "%s"FactionInfo[orgid][lider2]);
            case 
2format(Name1sizeof(Name1), "%s"FactionInfo[orgid][lider3]);
            case 
3format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro1]);
            case 
4format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro2]);
            case 
5format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro3]);
            case 
6format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro4]);
            case 
7format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro5]);
            case 
8format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro6]);
            case 
9format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro7]);
            case 
10format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro8]);
            case 
11format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro9]);
            case 
12format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro10]);
            case 
13format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro11]);
            case 
14format(Name1sizeof(Name1), "%s"FactionInfo[orgid][membro12]);
        }
        if(
strcmp(name"Empty")) {
            
ShowPlayerDialog(playerid591DIALOG_STYLE_INPUT"Gerenciar""Digite abaixo o nome do jogador""Invite""Cancel");
        }
        else if(
strcmp(Name1Name2)) { // error 035: argument type mismatch (argument 3)
            
ShowPlayerDialog(playerid592DIALOG_STYLE_INPUT"Gerenciar""Pedir Contas""Select""Cancel");
        }
        else {
            
ShowPlayerDialog(playerid593DIALOG_STYLE_INPUT"Gerenciar""Demitir\nMudar Cargo""Select""Cancel");
        }
    } 
I rep you, but it dont work bro, dont show real names on FactionInfo[orgid][lider1], lider2..........

And all times when i choose a item enter on else
else {
ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "Gerenciar", "Demitir\nMudar Cargo", "Select", "Cancel");
}
Reply


Messages In This Thread
Help dialog compare String - by luccagomes15 - 04.09.2015, 01:44
Re: Help dialog compare String - by SickAttack - 04.09.2015, 01:53
Re: Help dialog compare String - by GXLZPGX - 04.09.2015, 02:21
Re: Help dialog compare String - by luccagomes15 - 06.09.2015, 11:47

Forum Jump:


Users browsing this thread: 1 Guest(s)