[Ajuda] Security
#1

Alguйm pode me informar oque й isso?

pawn Код:
new Security = 0;

    if(Security != 0)
    {
        ClearChatForPlayer(playerid);
        SendClientMessage(playerid,COLOR_RED,"Vocк quebrou as regras e uma providencia foi tomada.");
        SendClientMessage(playerid,COLOR_WHITE,"* Vocк foi kickado automaticamente do servidor.");
        Kick(playerid);
        return 1;
    }

public LoadStuff()
{
    new arrCoords[4][64];
    new strFromFile2[256];
    new File: file = fopen("stuff.ini",io_read);
    if (file)
    {
        fread(file,strFromFile2);
        split(strFromFile2,arrCoords,',');
        Jackpot = strval(arrCoords[0]);
        Tax = strval(arrCoords[1]);
        TaxValue = strval(arrCoords[2]);
        Security = strval(arrCoords[3]); // aqui!!
        fclose(file);
        if(Security == 0 || Security == 1)
        {
        }
        else
        {
            GameModeExit();
        }
    }
    else
    {
        GameModeExit();
    }
    return 1;
}

public SaveStuff()
{
    new coordsstring[256];
    format(coordsstring,sizeof(coordsstring),"%d,%d,%d,%d",Jackpot,Tax,TaxValue,Security);//aqui!
    new File: file2 = fopen("stuff.ini",io_write);
    fwrite(file2,coordsstring);
    fclose(file2);
    return 1;
}

    if(strcmp(cmd,"/agreementbroken",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid,COLOR_YELLOW,"Agreement Violation Security has been activated.");
            Security = 1;
            SaveStuff();
            GameModeExit();
        }
        return 1;
    }
que porraw й essa? ..
Isso tem em gms Godfather, mais quero ativar isso mais nem sei oque й .. '.'
Reply
#2

-Security й falso, caso nгo seja falso ele envia uma mensagem e kika o player.

-LoadStuff acredito que й para salvar isso em um arquivo e o comando й para salvar e setar verdadeiro para a funзгo Security.
Reply
#3

Eu queria saber qual a funзгo do Cуdigo.. oque isso faz?
Reply
#4

Vou explicar melhor.
Simplesmente adicionar violaзгo para o player como verdadeiro e kika o player.
e existe umas variбveis de salvamento do prуprio codigo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)