Jump to content

Question

Posted

salut , comanda /o o poate folosi orice player .... Vreau sa o poata folosi doar admin 1

[pawn]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 ((noooc) && 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;

}[/pawn]  MULTUMESC

<a href="http://www.game-state.eu/94.60.40.50:7777/"><img src="http://www.game-state.eu/94.60.40.50:7777/n-560x95_FFFFFF_FFFFFF_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

3 answers to this question

Recommended Posts

Posted

Ca sa nu o foloseaca dai /noooc daca vrei sa pui restrictie doar la admini :

            if(PlayerInfo[playerid][pAdmin] > 1)
	    {
	    SendClientMessage(playerid, COLOR_GREY, "Ne pare rau, dar nu esti admin");
	    return 1;
	    }

Posted

Ca sa nu o foloseaca dai /noooc daca vrei sa pui restrictie doar la admini :

            if(PlayerInfo[playerid][pAdmin] > 1)
	    {
	    SendClientMessage(playerid, COLOR_GREY, "Ne pare rau, dar nu esti admin");
	    return 1;
	    }

Si intre care lini o adaug , sau pe care o elimin ?

<a href="http://www.game-state.eu/94.60.40.50:7777/"><img src="http://www.game-state.eu/94.60.40.50:7777/n-560x95_FFFFFF_FFFFFF_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

Uite aici OOC , ti-l modifici dupa bunul plac !

[pawn] if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)

{

if(IsPlayerConnected(playerid))

{

if(gPlayerLogged[playerid] == 0)

{

SendClientMessage(playerid, COLOR_GREY, "  Nu esti logat inca !");

return 1;

}

if ((noooc) && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTrial] < 1)

{

SendClientMessage(playerid, COLOR_GRAD2, "  Canalul OOC este dezactivat de un Admin !");

return 1;

}

if(PlayerInfo[playerid][pMuted] >= 1)

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "  Nu poti vorbi, ai mute !");

return 1;

}

GetPlayerName(playerid, sendername, sizeof(sendername));

new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[182];

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, "{00FF00}Folosire:{FFFFFF} (/o)oc [ooc chat]");

return 1;

}

for(new i; i < sizeof(TLD); i++)

{

    if(strfind(result, TLD, true) != -1)

    {

        if(strfind(result, "www.Server.Ro", true) != -1 || strfind(result, "Server", true) != -1 || strfind(result, "Server.Ro", true) != -1) break; // Filter out your own website

        SendClientMessage(playerid, COLOR_RED, "{DC0C0C}Reclama: {FFFFFF}Nu face reclama!");

        //Kick(playerid);

        return 1;

    }

}

  if(GoIP(result))

{

new reclama[MAX_PLAYER_NAME];

GetPlayerName(playerid, reclama, sizeof(reclama));

SendClientMessage(playerid, 0xFF0000FF, "{DC0C0C}Reclama: {FFFFFF}Nu face reclama!");

return 1;

}

if(PlayerInfo[playerid][pAdmin] >= 2) { format(string, sizeof(string), "(( Admin %s: %s ))", sendername, result); }

else if(PlayerInfo[playerid][pAdmin] == 7) { format(string, sizeof(string), "(( Scripter Server %s: %s ))", sendername, result); }

else if(PlayerInfo[playerid][pAdmin] == 8) { format(string, sizeof(string), "(( Detinator Server %s: %s ))", sendername, result); }

else if(PlayerInfo[playerid][pAdmin] == 6) { format(string, sizeof(string), "(( Coordonator Server %s: %s ))", sendername, result); }

else { format(string, sizeof(string), "(( %s: %s ))", sendername, result); }

OOCOff(COLOR_LIGHTRED,string);

printf("%s", string);

}

return 1;

}[/pawn]

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.