This shouldn't be happening?
#2

pawn Код:
CMD:deployradio (playerid, params[])
{
    if(PRinfo[playerid][radioDeployed]==1) //PLayer already has 1 deployed
    {
        return SendClientMessage(playerid, 0xFC00FCF, "You have already deployed an radio.");
    }
    for(new i=0;i<MAX_PLAYERS+1;i++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 10.0, PRinfo[i][locX], PRinfo[i][locY], PRinfo[i][locZ]))//Cannont deploy if someone deployed already 1,near him
        {
            SendClientMessage(playerid, COLOR_GREY, "You can not place a radio near already existing one.Find another place");
            return 1;
        }
    }
    ShowPlayerDialog(playerid, MUSIC_DIALOG, DIALOG_STYLE_LIST, "Choose a song", radioSongs, "OK", "");
    return 1;
}
You can't have an "else" statement under a "for".
Reply


Messages In This Thread
This shouldn't be happening? - by Tagathron - 10.11.2013, 09:42
Re: This shouldn't be happening? - by Emmet_ - 10.11.2013, 09:43

Forum Jump:


Users browsing this thread: 1 Guest(s)