[Pomoc] /newbie

Započeo yabb3, April 14, 2013, 13:12:05 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Dobar dan,
Trebam Pomoc oko newbie systema
Mod koji koristim: Ravens GM
Stavljeno je da ako je igrac ispod levela 3- da ne moze koristiti newbie
if(PlayerInfo[playerid][pLevel] > 3){SendClientMessage(playerid,COLOR_RED,"You can't use this chat because you are not level 3+!");return 1;}


Ali problem je u tome sto kada dam /starterkit igracu namesti mu se level 3 ali cim /setstat levele na vise na primer 20 on ne moze koristiti newbie ne razumem sta je problem u ovoj liniji

Ceo kod:
if(strcmp(cmd, "/newbie", true) == 0 || strcmp(cmd, "/n", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
				return 1;
			}
		    if(nonewbie == 1)
		    {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "Newbie chat is off.");
				return 1;
			}
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[128];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/n)ewbie [newbie chat]");
				return 1;
			}
		 	if(PlayerInfo[playerid][pHelper] == 0)
		 	{
               if(PlayerInfo[playerid][pLevel] > 3){SendClientMessage(playerid,COLOR_RED,"You can't use this chat because you are not level 3+!");return 1;}
			   format(string, sizeof(string), "[ID:%i] [NEWBIE]: Newbie %s: %s",playerid, sendername, result);
		 	}
	   		else if(PlayerInfo[playerid][pHelper] == 1)
	   		{
			   format(string, sizeof(string), "[ID:%i] [NEWBIE]: Helper %s: %s",playerid, sendername, result);
	   		}
	   		else if(PlayerInfo[playerid][pHelper] == 2)
	   		{
			   format(string, sizeof(string), "[ID:%i] [NEWBIE]: Master %s: %s",playerid, sendername, result);
	   		}
			else if(PlayerInfo[playerid][pHelper] == 3)
			{
				format(string, sizeof(string), "[NEWBIE]: Administrator %s: %s", sendername, result);
			}
			SendClientMessageToAll(0x62B382AA, string);
			new y, m, d;
			new h,mi,s;
			getdate(y,m,d);
			gettime(h,mi,s);
			format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (newbie): (%s)",d,m,y,h,mi,s, sendername, result);
			ChatLog(string);
		}
		return 1;
	}


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.

Brate stavljeno je ad ako je igrac IZNAD 3 level da ne moze da koristi /newbie

if(PlayerInfo[playerid][pLevel] < 3){SendClientMessage(playerid,COLOR_RED,"You can't use this chat because you are not level 3+!");return 1;}

Citat: Blaeks poslato April 14, 2013, 13:27:07 POSLE PODNE
if(PlayerInfo[playerid][pLevel] < 3){SendClientMessage(playerid,COLOR_RED,"You can't use this chat because you are not level 3+!");return 1;}


Aha kao u matematici <> vece manje sad sam skontao.

Hvala na pomoci Blaeks


forum.sa-mp.com info:
Over 1000 posts.
Over 50 reputation.