Jump to content

Koala

Membru
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by Koala

  1. if(strcmp(cmdtext, "/ban", true) == 0)

        {

            if(IsPlayerConnected(playerid))

            {

    tmp = strtok(cmdtext, idx);

    id = ReturnUser(tmp);

    if(GlobalPlayerInfo[playerid][P_LEVEL] < gCommands[bAN])

    {

        new string[256];

        format(string, sizeof(string), "Esti admin %d? Nu deci, stai la locu tau!", gCommands[bAN]);

        return SendClientMessage(playerid, COLOUR_ORANGE, string);

    }

    if(IsPlayerConnected(id) && id != playerid)

    {

        new string[256];

        format(string, sizeof(string), "%s a primit ban!", GlobalPlayerInfo[id][P_NAME]);

        SendClientMessageToAll(COLOUR_ORANGE, string);

        Ban(id);

    }

    else

        return SendClientMessage(playerid, COLOUR_ORANGE, "Nu iti poti da ban tie sau la un player care nu ii pe server!");

      }

    return 1;

        }

    Pai singura conditie pe care ai pus-o tu aici e doar ca playerul sa fie conectat... Trebuie sa faci o variabila noua in care sa salvezi 1 daca playerul e admin sau 0 daca nu si mai adaugi un if inainte de a face comanda.

×
×
  • 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.