Jump to content
  • 0

Problema report si event sistem


alexutu

Question

1)Salut Sa-Mp.Am si eu o problema cu comanda report,dau report iar cand trb sa dau iara peste un min nu merge am asteptat si 5 min si degeaba.

[pawn] if(strcmp(cmd, "/report", true) == 0 || strcmp(cmd, "/re", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

            if(PlayerReported[playerid] == -1)//report timer

            {

              SendClientMessage(playerid,COLOR_RED,"Poti da /report doar o data pe minut !");

            }

            else if(PlayerReported[playerid] == 0)

            {

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

new length = strlen(cmdtext);

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

{

idx++;

}

new offset = idx;

new result[130];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

result[idx - offset] = EOS;

if(!strlen(result))

{

SendClientMessage(playerid, 0x0080FFFF, "USAGE: /report [text]");

return 1;

}

format(string, sizeof(string), "[REPORT] de la player %s(ID:%d): %s", sendername,playerid, (result));

ABroadCast(0xE19898AA,string,1);

SendClientMessage(playerid, 0xFF80FFFF,"[REPORT INFO]: ~~|Reportul tau a fost trimis Adminilor. Ei se vor uita si iti vor raspunde|~~");

SetTimerEx("ResetReport", 60000, 0, "d", playerid);

    PlayerReported[playerid] = -1;

    CallReport[playerid] = 1;

    for(new i = 0; i < MAX_PLAYERS; i ++)

{

    if(PlayerInfo[pAdmin] >= 1 || PlayerInfo[pHelper] >= 1)

    {

        format(string, sizeof(string), "~r~REPORT:%s",sendername);

        GameTextForPlayer(i,string,3000,3);

    }

    }

    }

    }

    return 1;

}[/pawn]

2)Am si eu sistemu de event: http://forum.sa-mp.com/showthread.php?t=397513.Il descarc il bag in folderu file script si in svr cfg pornesc svr si nu merge dc?

(?_?_?_?(???????????(??_?_?_??K??E??N??T?????????_?_?_?_?()??

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

1. E un cod groaznic de mare,neoptimizat si cu acel timer fara rost incarca modul foarte mult. Add: nu sa lasa id-uri si te voi ajuta sa il optimizezi.

2. Pot fi zeci de motive pentru care nu functioneaza FS-ul respectiv.

ep41yhufqpagka5wfoornw1wjfjie.png

HTjr_G.png
12975.png
 
Link to comment
Share on other sites

Ia incearca sa bagi asta :

[pawn]cmd(report, playerid, params[])

{

  new infractor, reason[128];

  if(sscanf(params, "us", infractor, reason)) return SendClientMessage(playerid, GRAY, "Scrie: /report [nume/ID jucator] [motiv]");

  if(infractor != INVALID_PLAYER_ID)

  {

    new namer[48], string[128];

    GetPlayerName(playerid, namer, sizeof(namer));

    format(string, sizeof string, "Raportare jucator: %d Motiv: %s Raport trimis de %s", infractor, reason, namer);

    SendMessageToAdmins(WHITE, "|_____________________Raport_____________________|");

    SendMessageToAdmins(GREEN, string);

    SendMessageToAdmins(WHITE, "|________________________________________________|");

    SendClientMessage(playerid, GREEN, "Multumim!Raportul a fost trimis catre toti Administratorii online!");

  } else SendClientMessage(playerid, RED, "Nu este nici un jucator conectat cu acest nume!");

  return 1;

}[/pawn]

Te-am ajutat ? Dami un +1 si suntem chit :) !

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.