[HELP] else not working
#10

pawn Код:
CMD:g(playerid,params[])
{
    new rank[50],name[50],text[200],msg[250];
    if(sscanf(params,"s[200]",text)) return SendClientMessage(playerid,-1,"USAGE: /g [text]");
    GetPlayerName(playerid,name,sizeof(name));
    if(PlayerInfo[playerid][pAdmin] > 0){rank ="Admin";}
    if(PlayerInfo[playerid][pHelper] > 0){rank ="Helper";}
    if(PlayerInfo[playerid][pDonateRank] > 0){rank ="V.I.P.";}
    if(PlayerInfo[playerid][pAdmin] < 0 || PlayerInfo[playerid][pHelper] < 0 || PlayerInfo[playerid][pDonateRank] < 0) {rank ="Player";}
    format(msg,sizeof(msg),"(( %s %s: %s ))",rank,name,text);
    for(new i=0;i<=MAX_PLAYERS;i++)
    {
        if(toggc[i] == 1)
        {
            SendClientMessage(i,COLOR_ORANGE,msg);
        }
        else{SendClientMessage(playerid, COLOR_RED, "======== Use /toggc First! ========");}
    }
    return 1;
}
Try it now, should work
Reply


Messages In This Thread
[HELP] else not working - by ShinichiKudou - 14.03.2014, 15:32
Re: [HELP] else not working - by ShinichiKudou - 14.03.2014, 15:39
Re: [HELP] else not working - by Matess - 14.03.2014, 15:45
Re: [HELP] else not working - by ShinichiKudou - 14.03.2014, 15:49
Re: [HELP] else not working - by ShinichiKudou - 14.03.2014, 15:58
Re: [HELP] else not working - by Matess - 14.03.2014, 16:00
Re: [HELP] else not working - by ShinichiKudou - 14.03.2014, 16:03
Re: [HELP] else not working - by ShinichiKudou - 14.03.2014, 16:37
Re: [HELP] else not working - by ShinichiKudou - 14.03.2014, 16:45
Re: [HELP] else not working - by Psyhophatic - 14.03.2014, 17:32

Forum Jump:


Users browsing this thread: 4 Guest(s)