Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #define COLOR_AQUA 0x00FFFFFF
- #define COLOR_LIGHTGREEN 0x90EE90FF
- #define COLOR_PURPLE 0x800080FF
- #define COLOR_GOLD "0xFFD700FF"
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_RED 0xFF0000FF
- #define COLOR_FIREBRICK B22222FF
- #define COLOR_ORANGE 0xFFA500FF
- #define COLOR_SILVER 0xC0C0C0FF
- new hunted[MAX_PLAYERS];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n---------Signed, Preda----------");
- print("EVENT VANATOARE SUXEFULLY LOADED");
- print(" ---------Signed, Preda----------\n");
- return 1;
- }
- #else
- #endif
- public OnPlayerConnect(playerid)
- {
- hunted[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- hunted[playerid] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- hunted[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- hunted[playerid] = 0;
- if(hunted[playerid] == 1)
- {
- new
- g_szString [ 256 ],
- pName [ 24 ],
- killername [MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof ( pName ) );
- GetPlayerName(killerid, killername, sizeof (killername));
- format( g_szString, sizeof ( g_szString ), "[EVENT]%s a fost omorat de catre %s ! Acesta a primit 20.000 $ !", pName, killername );
- SendClientMessageToAll(0x90EE90FF, g_szString );
- GivePlayerMoney(killerid, 20000);
- }
- return 1;
- }
- stock IsPlayerHunted(playerid)
- {
- if(hunted[playerid] == 1)
- {
- }
- return 1;
- }
- forward SelectPlayerHunted(playerid);
- public SelectPlayerHunted(playerid)
- {
- new PCount, String[50], Name[MAX_PLAYER_NAME];
- for(new i; i<GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i)) PCount++;
- hunted[i] = 1;
- }
- new Hunted = random(PCount);
- GetPlayerName(Hunted, Name, MAX_PLAYER_NAME);
- format(String, 50, "%s trebuie ucis !", Name);
- SendClientMessageToAll(COLOR_RED, String);
- SendClientMessageToAll(COLOR_RED, "RECOMPENSA: 20.000$");
- HuntedFunction(playerid);
- SetTimer("PlayerNotKilled", 5000, false);
- return 1;
- }
- forward HuntedFunction(playerid);
- public HuntedFunction(playerid)
- {
- new x = random(MAX_PLAYERS);
- if(hunted[x] == 1)
- {
- GivePlayerWeapon(x, 9, 1);
- GivePlayerWeapon(x, 22, 999);
- GivePlayerWeapon(x, 26, 99999);
- GivePlayerWeapon(x, 28, 9999);
- GivePlayerWeapon(x, 31, 99999);
- GivePlayerWeapon(x, 37, 99999);
- SetPlayerHealth(x, 100);
- SetPlayerArmour(x, 100);
- SetPlayerColor(x, COLOR_RED);
- }
- return 1;
- }
- forward PlayerNotKilled(playerid);
- public PlayerNotKilled(playerid)
- {
- if(hunted[playerid] == 1)
- {
- hunted[playerid] = 0;
- new
- g_szString [ 256 ],
- pName [ 24 ];
- GetPlayerName(playerid, pName, sizeof ( pName ) );
- format( g_szString, sizeof ( g_szString ), "Nimeni nu a reusit sa il omoare pe %s !", pName);
- SendClientMessageToAll(0x90EE90FF, g_szString );
- GivePlayerMoney(playerid, 20000);
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/starthunt", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- SelectPlayerHunted(playerid);
- SendClientMessage(playerid, COLOR_AQUA, "HUNTING EVENT a inceput !");
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement