SA-MP Forums Archive
Warrning on IF else - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Warrning on IF else (/showthread.php?tid=560226)



Warrning on IF else - SkiT'aZ - 27.01.2015

Nevermind. I fixed it


Re: Warrning on IF else - CalvinC - 27.01.2015

Fixed it for you here, but you can read more about loose indentation here: https://sampforum.blast.hk/showthread.php?tid=256961
pawn Код:
CMD:tyliai(playerid, params[])
{
    if(PlayerInfo[playerid][pMask] == 0)
    {
        new
            string[128],
            tyliai[100];
        if(sscanf(params, "s[100]", tyliai)) return SendClientMessage(playerid, COLOR_GRAD2, "NAUDOJIMAS:"COL_WHITE" /(t)yliai [tekstas]");
        format(string, sizeof(string), "%s tyliai: %s", RPName(playerid),tyliai);
        ProxDetector(10.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
        ApplyAnimation(playerid, "RIOT", "RIOT_shout",4.1,0,0,0,0,0);
    }
    else
    {
        new
            string[128],
            tyliai[100];
        if(sscanf(params, "s[100]", tyliai)) return SendClientMessage(playerid, COLOR_GRAD2, "NAUDOJIMAS:"COL_WHITE" /(t)yliai [tekstas]");
        format(string, sizeof(string), "Nepaћistamasis tyliai: %s", RPName(playerid),tyliai);
        ProxDetector(10.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
        ApplyAnimation(playerid, "RIOT", "RIOT_shout",4.1,0,0,0,0,0);
    }
    return 1;
}