SERVER: Unknown command
#7

Quote:
Originally Posted by rumbiic
Quote:
Originally Posted by dice7
Try removing the else, so there will only be the return
You mean like this?:
Код:
if(strcmp("/levelup", cmdtext, true, 10) == 0)
	{
  		if(gPlayerLogged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pLevel] == 0)
			{
				if(nauda >= 1)
				{
  					SendClientMessage(playerid, COLOR_WHITE, "[Info:] Tu nopirki 1 limeni");
  					SendClientMessage(playerid, COLOR_WHITE, "[Info:] Tagad tu vari izmantot komandu /count");
  					PlayerInfo[playerid][pLevel] = 1;
  					return 1;
				}
			}
		}
		return SendClientMessage(playerid, COLOR_GREY, "[Kluda:] Tev vispirms ir jaielogojas");
	}
Now it says "[Kluda:] Tev vispirms ir jaielogojas" even if I'm logged in.
pawn Код:
if(strcmp("/levelup", cmdtext, true, 10) == 0)
{
    if(gPlayerLogged[playerid] == 1)
    {
        if(PlayerInfo[playerid][pLevel] == 0)
        {
            if(nauda >= 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "[Info:] Tu nopirki 1 limeni");
                SendClientMessage(playerid, COLOR_WHITE, "[Info:] Tagad tu vari izmantot komandu /count");
                PlayerInfo[playerid][pLevel] = 1;
                return 1;
            }
            //SendClientMessage(playerid, color, "you need to be level 0"):
            return 1;
        }
        //SendClientMessage(playerid, color, "you need to be logged"):
        return 1;
    }
    return SendClientMessage(playerid, COLOR_GREY, "[Kluda:] Tev vispirms ir jaielogojas");
}
Reply


Messages In This Thread
SERVER: Unknown command - by rumbiic - 30.12.2009, 08:11
Re: SERVER: Unknown command - by daalz - 30.12.2009, 08:23
Re: SERVER: Unknown command - by rumbiic - 30.12.2009, 08:35
Re: SERVER: Unknown command - by dice7 - 30.12.2009, 08:43
Re: SERVER: Unknown command - by MerLow - 30.12.2009, 08:48
Re: SERVER: Unknown command - by rumbiic - 30.12.2009, 08:49
Re: SERVER: Unknown command - by dice7 - 30.12.2009, 08:51
Re: SERVER: Unknown command - by rumbiic - 30.12.2009, 08:55
Re: SERVER: Unknown command - by dice7 - 30.12.2009, 09:01
Re: SERVER: Unknown command - by MerLow - 30.12.2009, 09:02

Forum Jump:


Users browsing this thread: 1 Guest(s)