Jump to content
  • 0

Problema /newbie


ToX1c

Question

Salut cand scriu pe /n nu imi apare nimic , poate cineva sa ma ajute?

if(strcmp(cmd, "/n", true) == 0 || strcmp(cmd, "/newbie", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(!gPlayerLogged[playerid])
	        {
	            SendClientMessage(playerid, COLOR_GREY, "Nu te-ai logat.");
	            return 1;
	        }
		    if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_MEDIC_COLOR, MUTE_TEXT);
				return 1;
			}
	        if(NewbieChat) return SendClientMessage(playerid,COLOR_GRAD1,"Canalul de conversatii pentru incepatori a fost dezactivat de un administrator.");
	        if(NewbieCountDown[playerid]) return SendClientMessage(playerid,COLOR_GREY,"Trebuie sa astepti 10 secunde pentru a utiliza din nou canalul de conversatii pentru incepatori.");
	        if(gNewbie[playerid]) return 1;
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			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, "UTILIZARE: (/n)ewbie [newbie chat]");
				return 1;
			}
			result[0] = toupper(result[0]);

			new l = PlayerInfo[playerid][pLeader];
			new tt[24];
			if(l == 1) tt = "PD";
			else if(l == 2) tt = "F.B.I";
			else if(l == 3) tt = "NG";
			else if(l == 4) tt = "Medic";
			else if(l == 5) tt = "La Cosa Nostra";
			else if(l == 6) tt = "Yakuza";
			else if(l == 7) tt = "Mayor";
			else if(l == 8) tt = "Hitman";
			else if(l == 9) tt = "UST";
			else if(l == 10) tt = "Smugglers";
			else if(l == 11) tt = "SI";
			else if(l == 12) tt = "SFR";
			else if(l == 13) tt = "Grove";
			else if(l == 14) tt = "Ballas";
			else if(l == 15) tt = "DNB";
			GetPlayerName(playerid,sendername,sizeof(sendername));
			if(FindIP(result))
			{
			    GetPlayerName(playerid,sendername,sizeof sendername);
			    format(string,sizeof string,"[AdmWarning] %s a scris un IP:",sendername);
				SendAdminMessage(0xF7F99BFF,string);
			    format(string,sizeof string,"\"%s\"",result);
				SendAdminMessage(0xF7F99BFF,string);
			}

			if(PlayerInfo[playerid][pLevel] < 4 && !PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pLeader])
            NewbieCountDown[playerid] = true,
            SetTimerEx("Newbiecountdown",10000,false,"d",playerid);

			if(PlayerInfo[playerid][pLevel] < 4 && !PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pLeader])
			{
				format(string,sizeof(string),"(N) Incepator de level %i %s: %s",PlayerInfo[playerid][pLevel],sendername,(result));
			}
			else if(PlayerInfo[playerid][pAdmin] > 0)
			{
           		format(string,sizeof(string),"(N) Admin Level %i %s: %s",PlayerInfo[playerid][pAdmin],sendername,(result));
            }
            else if(PlayerInfo[playerid][pHelper] > 0)
			{
           		format(string,sizeof(string),"(N) Helper Level %i %s: %s",PlayerInfo[playerid][pAdmin],sendername,(result));
            }
            else if(PlayerInfo[playerid][pLeader] > 0)
            {
           		format(string,sizeof(string),"(N) Lider %s %s: %s",tt,sendername,(result));
            }
            else return 1;
			SendNewbieMessage(0xBFF55AFF,string);
			if(!gNewbie[playerid])
			printf("(N) %s",string);
		}
	}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.