Jump to content
  • 0

Problema comanda "/o"


AlBerTo15

Question

Salut.Am si eu o problema cu comanda /o ,o poate folosi oricine si ea e facuta pentru admini level 1 .

Uitati comanda:

if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet !");
	            return 1;
	        }
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "The OOC channel has been disabled by an 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;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
				return 1;
			}
			format(string, sizeof(string), "(( %s: %s ))", sendername, result);
			OOCOff(COLOR_OOC,string);
			printf("%s", string);
		}
		return 1;
	}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Schimba

if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
				return 1;
			}
cu
if(PlayerInfo[playerid][pMuted] < 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
				return 1;
			}

Link to comment
Share on other sites

stuntman[]!" post="91598" timestamp="1314991349"]

Schimba

if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
				return 1;
			}
cu
if(PlayerInfo[playerid][pMuted] < 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
				return 1;
			}

n-are nicio legatura /facepalm.

schimba

[pawn]if (PlayerInfo[playerid][pAdmin] >= 1)

[/pawn]

cu [pawn]if( PlayerInfo[ playerid ][ pAdmin ] < 1 )[/pawn]

sa nu faci cum ti-a zis stuntman, atunci playerii care au mute o sa vorbeasca iar cei fara mute nu vor putea.

Link to comment
Share on other sites

n-are nicio legatura /facepalm.

schimba

[pawn]if (PlayerInfo[playerid][pAdmin] >= 1)

[/pawn]

cu [pawn]if( PlayerInfo[ playerid ][ pAdmin ] < 1 )[/pawn]

sa nu faci cum ti-a zis stuntman, atunci playerii care au mute o sa vorbeasca iar cei fara mute nu vor putea.

Ah, greseala mea, nu m-am uitat atent la variabila, credeam ca o luasem pe cea cu pAdmin xD

E bine cum a zis Razvann

Link to comment
Share on other sites

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.