- 0
Ajutor Semnalizari
-
Similar Content
-
- 2 answers
- 150 views
-
ajutor urgent
By R4zvyy,
- 1 answer
- 387 views
-
- 0 replies
- 78 views
-
- 4 replies
- 122 views
-
- 1 answer
- 136 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
capetanos
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
Link to comment
Share on other sites
6 answers to this question
Recommended Posts