Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //In cima
- #define COLOR_RED 0xFF0000AA
- #define LIMITE_SALTI 5//Cambiatelo col numero massimo di salti che un player deve fare per far spuntare l'avviso agli admins
- new BunnyHop[MAX_PLAYERS];
- //Sotto OnPlayerConnect
- BunnyHop[playerid] = 0;
- //Sotto OnPlayerKeyStateChange
- if(newkeys & KEY_JUMP && !IsPlayerInAnyVehicle(playerid))
- {
- BunnyHop[playerid]++;
- if(BunnyHop[playerid] == LIMITI_SALTI)
- {
- new string[128];
- format(string,sizeof(string),"[ATTENZIONE]Si sospetta che %s stia facendo BunnyHop. Controlla!",PlayerName(playerid));
- MessaggioAdmin(COLOR_RED,string);
- SetTimerEx("ResetBunnyHop",10*1000,false,"i",playerid);
- }
- }
- //Fuori da tutto
- PlayerName(playerid)
- {
- new playerName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playerName,sizeof(playerName));
- return playerName;
- }
- MessaggioAdmin(colore,string[])
- {
- for(new i = 0; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i) && IsPlayerAdmin(i))
- {
- SendClientMessage(i,colore,string);
- printf(string);
- }
- }
- }
- forward ResetBunnyHop(playerid);
- public ResetBunnyHop(playerid)
- {
- BunnyHop[playerid] = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement