Jump to content

capetanos

Membru
  • Posts

    51
  • Joined

  • Last visited

Everything posted by capetanos

  1. Nick:capetanos Problema:am luat un sitem semnalizari de pe net si lam baga pe serverul meu si cand semnalizeaza cineva vede tot serverul Erori / warnings: cand semnaizes vede tot serverul Lini/script:[pawn]/* Simple Signaling System v2.0 - Adaugat Anti-Signaling-Spam...nu va lasa sa semnalizati in exces si o data la 5 secunde(puteti schimba in cate vreti voi!) */ #include < a_samp > #pragma tabsize 0 #define COLOR_PINK 0xFFC0CBAA #define COLOR_ULTRARED 0xE60000AA #define ANTISIGSPAM_TIME 2 // numarul de secunde dupa care va lasa din nou sa semnalizati! Puteti sa-l schimbati in cate secude vreti! forward antispamtimer(id); new string[ 128 ]; new antisigspam[MAX_PLAYERS]; public OnFilterScriptInit() { printf(" ASRock's Simple Signaling System v2.0!"); return 1; } public antispamtimer(id) { antisigspam[id] = 0; } public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) { if ( newkeys == KEY_LOOK_RIGHT ) { if ( IsPlayerInAnyVehicle ( playerid ) ) { if (antisigspam[playerid] == 0) { format ( string, sizeof ( string ), "{E60000}* %s {FFC0CB}a semnalizat spre dreapta.", pname( playerid ) ); SendClientMessageToAll( COLOR_PINK, string ); format ( string, sizeof ( string ), "* > {E60000}%s {FFC0CB}>", pname( playerid ) ); SendClientMessageToAll( COLOR_PINK, string ); antisigspam[playerid] = 1; SetTimerEx("antispamtimer", ANTISIGSPAM_TIME*1000, false, "d", playerid); } else { format( string, sizeof ( string ), "Te rog asteapta {FFC0CB}%d {E60000}secunde pana sa semnalizezi din nou!", ANTISIGSPAM_TIME); SendClientMessage( playerid, COLOR_ULTRARED, string ); } } } if ( newkeys == KEY_LOOK_LEFT ) { if ( IsPlayerInAnyVehicle ( playerid ) ) { if (antisigspam[playerid] == 0) { format ( string, sizeof ( string ), "{E60000}* %s {FFC0CB}a semnalizat spre stanga.", pname( playerid ) ); SendClientMessageToAll( COLOR_PINK, string ); format ( string, sizeof ( string ), "* < {E60000}%s {FFC0CB}<", pname( playerid ) ); SendClientMessageToAll( COLOR_PINK, string ); antisigspam[playerid] = 1; SetTimerEx("antispamtimer", ANTISIGSPAM_TIME*1000, false, "d", playerid); } else { format( string, sizeof ( string ), "Te rog asteapta {FFC0CB}%d {E60000}secunde pana sa semnalizezi din nou!", ANTISIGSPAM_TIME); SendClientMessage( playerid, COLOR_ULTRARED, string ); } } } } stock pname(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); return name; }[/pawn] Ai incercat sa rezolvi singur ?:nu deoarece nu ma pricep
×
×
  • 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.