Jump to content
  • 0

[GF/RP] Help Problema /o si /n


Question

Posted

Salut. Am si eu o problema la chaturile /o si /n:( cand dau /noooc, sa il inchid dupa ce zice ca e inchis tot pot sa scriu pe /o aceiasi problema si la /n :( ce sa fac?:| Comenzile sunt urmatoarele:

/o:

//----------------------------------[ooc]-----------------------------------------------
	if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet !");
	            return 1;
	        }
			if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Chatul OOC a fost dezactivat de catre un Admin !");
				return 1;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
				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;
			result[0] = toupper(result[0]);
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
				return 1;
			}
			if(PlayerInfo[playerid][pAdmin] < 1)
			{
			    if(FindIP(result))
				{
	   				SendClientMessage(playerid, COLOR_ADMIN, "[Anti-Cheat]: You have been kicked by anti cheat for Server Advertising !(KICK)");
    				new advertiser[MAX_PLAYER_NAME];
					GetPlayerName(playerid, advertiser, sizeof(advertiser));
					format(string, sizeof(string), "[Anti-Cheat]: %s was -kicked-, reason: Server Advertising",advertiser);
					SendClientMessageToAll(COLOR_LIGHTRED,string);
					KickLog(string);
 					Kick(playerid);
  					return 1;
				}
				format(string, sizeof(string), "(( %s: %s ))", sendername, result);
				OOCOff(COLOR_OOC,string);
				printf("%s", string);
			}
			else if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(FindIP(result))
				{
	   				SendClientMessage(playerid, COLOR_ADMIN, "[Anti-Cheat]: You have been kicked by anti cheat for Server Advertising !(KICK)");
    				new advertiser[MAX_PLAYER_NAME];
					GetPlayerName(playerid, advertiser, sizeof(advertiser));
					format(string, sizeof(string), "[Anti-Cheat]: %s was -kicked-, reason: Server Advertising",advertiser);
					SendClientMessageToAll(COLOR_LIGHTRED,string);
					KickLog(string);
 					Kick(playerid);
  					return 1;
				}
			    format(string, sizeof(string), "(( Admin {F81414}%s: {FFFFFF}%s ))", sendername, result);
				OOCOff(COLOR_OOC,string);
				printf("%s", string);
			}
		}
		return 1;
	}
/n:
	if(strcmp(cmd, "/newbie", true) == 0 || strcmp(cmd, "/n", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet !");
	            return 1;
	        }
			if ((stopnew) && PlayerInfo[playerid][pAdmin] < 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "The newbie channel has been disabled by an Admin !");
				return 1;
			}
			if(PlayerInfo[playerid][pLevel] >= 5)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You're not a newbie,you're past level 5 so you do not have access to this command");
				return 1;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
				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, "USAGE: (/n)ewbie [text]");
				return 1;
			}
			if(PlayerInfo[playerid][pAdmin] < 1)
			{
				format(string, sizeof(string), "(N)Newbie %s Level(%d) : %s", sendername, PlayerInfo[playerid][pLevel], result);
				OOCOff(COLOR_LIME,string);
				printf("%s", string);
			}
			else if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    format(string, sizeof(string), "(N)Admin %s Level(%d): %s", sendername, PlayerInfo[playerid][pLevel], result);
				OOCOff(COLOR_LIME,string);
				printf("%s", string);
			}
		}
		return 1;
	}

Sa iti dea Deumnezeu sanatate TzAkS

3 answers to this question

Recommended Posts

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.