Problem
#1

pawn Код:
public OnPlayerText(playerid, text[])
{   new file[256],PName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PName,MAX_PLAYER_NAME);
    format(file,sizeof(file),"/Users/%s.ini",PName);
    dini_Get(file," Muted ");
    if(1) return 0;
    return 1;
}
warning 206: redundant test: constant expression is non-zero
Reply
#2

Explain more, what is the line...

pawn Код:
public OnPlayerText(playerid, text[])
{   new file[256],PName[MAX_PLAYER_NAME], isMuted[ MAX_PLAYERS ]; // added a new variable isMuted
    GetPlayerName(playerid,PName,MAX_PLAYER_NAME);
    format(file,sizeof(file),"/Users/%s.ini",PName);
    isMuted[ playerid ] = dini_Get(file,"Muted"); // removed spaces
    if( isMuted[ playerid ] == 1 ) return !SendClientMessage( playerid, -1, "You are muted" ); // changed this line
    return 1;
}
Reply
#3

It Would be
pawn Код:
isMuted[ playerid ] = dini_Int(file,"Muted");
Thanks It worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)