#include #include #include #include #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define PocketMoney 0 // Amount player recieves on spawn. #define INACTIVE_PLAYER_ID 255 #define GIVECASH_DELAY 5000 // Time in ms between /givecash commands. #define NUMVALUES 4 forward MoneyGrubScoreUpdate(); forward Givecashdelaytimer(playerid); //forward GrubModeReset(); forward SetPlayerRandomSpawn(playerid); forward SetupPlayerForClassSelection(playerid); forward GameModeExitFunc(); //------------------------------------------------------------------------------------------------------ new CashScoreOld; new iSpawnSet[MAX_PLAYERS]; new Float:gRandomPlayerSpawns[1][3] = { //{1958.3783,1343.1572,15.3746}, //{2199.6531,1393.3678,10.8203}, //{2483.5977,1222.0825,10.8203}, //{2637.2712,1129.2743,11.1797}, //{2000.0106,1521.1111,17.0625}, //{2024.8190,1917.9425,12.3386}, //{2261.9048,2035.9547,10.8203}, //{2262.0986,2398.6572,10.8203}, //{2244.2566,2523.7280,10.8203}, //{2335.3228,2786.4478,10.8203}, //{2150.0186,2734.2297,11.1763}, //{2158.0811,2797.5488,10.8203}, //{1969.8301,2722.8564,10.8203}, //{1652.0555,2709.4072,10.8265}, //{1564.0052,2756.9463,10.8203}, //{1271.5452,2554.0227,10.8203}, //{1441.5894,2567.9099,10.8203}, //{1480.6473,2213.5718,11.0234}, //{1400.5906,2225.6960,11.0234}, //{1598.8419,2221.5676,11.0625}, //{1318.7759,1251.3580,10.8203}, //{1558.0731,1007.8292,10.8125}, //{-857.0551,1536.6832,22.5870}, Out of Town Spawns //{817.3494,856.5039,12.7891}, //{116.9315,1110.1823,13.6094}, //{-18.8529,1176.0159,19.5634}, //{-315.0575,1774.0636,43.6406}, {1705.2347,1025.6808,10.8203} }; new Float:gCopPlayerSpawns[2][3] = { {2297.1064,2452.0115,10.8203}, {2297.0452,2468.6743,10.8203} }; //Round code stolen from mike's Manhunt :P //new gRoundTime = 3600000; // Round time - 1 hour //new gRoundTime = 1200000; // Round time - 20 mins //new gRoundTime = 900000; // Round time - 15 mins //new gRoundTime = 600000; // Round time - 10 mins //new gRoundTime = 300000; // Round time - 5 mins //new gRoundTime = 120000; // Round time - 2 mins //new gRoundTime = 60000; // Round time - 1 min new gActivePlayers[MAX_PLAYERS]; new gLastGaveCash[MAX_PLAYERS]; //------------------------------------------------------------------------------------------------------ main() { print("\n----------------------------------"); print(" Running LVDM ~MoneyGrub\n"); print(" Coded By"); print(" Jax"); print(" Edited by Acid"); print("----------------------------------\n"); } //------------------------------------------------------------------------------------------------------ public MoneyGrubScoreUpdate() { new CashScore; new name[MAX_PLAYER_NAME]; //new string[256]; for(new i=0; i CashScoreOld) { CashScoreOld = CashScore; //format(string, sizeof(string), "$$$ %s is now in the lead $$$", name); //SendClientMessageToAll(COLOR_YELLOW, string); } } } } //------------------------------------------------------------------------------------------------------ /*public GrubModeReset() { for(new i=0; i 0 && playermoney >= moneys) { GivePlayerMoney(playerid, (0 - moneys)); GivePlayerMoney(giveplayerid, moneys); format(string, sizeof(string), "You have sent %s, $%d.", giveplayer, moneys); SendClientMessage(playerid, COLOR_YELLOW, string); format(string, sizeof(string), "You have recieved $%d from %s.", moneys, sendername); SendClientMessage(giveplayerid, COLOR_YELLOW, string); } else { SendClientMessage(playerid, COLOR_YELLOW, "Not enough cash."); } } else { format(string, sizeof(string), "%s is not an active player.", name); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } return 0; } if(strcmp(cmd, "/whisper", true) == 0){ new tmp[256]; new playername[MAX_PLAYER_NAME]; tmp = strrest(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /whisper [text]]"); return 1; } GetPlayerName(playerid,playername,sizeof(playername)); format(string,sizeof(string),"%s whispers: %s",playername,tmp); for(new i=0; i 0) { GivePlayerMoney(killerid, playercash); ResetPlayerMoney(playerid); } else { } } return 1; } /* public OnPlayerDeath(playerid, killerid, reason) { haxed by teh mike new name[MAX_PLAYER_NAME]; new string[256]; new deathreason[20]; new playercash; GetPlayerName(playerid, name, sizeof(name)); GetWeaponName(reason, deathreason, 20); if (killerid == INVALID_PLAYER_ID) { switch (reason) { case WEAPON_DROWN: { format(string, sizeof(string), "*** %s drowned.)", name); } default: { if (strlen(deathreason) > 0) { format(string, sizeof(string), "*** %s died. (%s)", name, deathreason); } else { format(string, sizeof(string), "*** %s died.", name); } } } } else { new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); if (strlen(deathreason) > 0) { format(string, sizeof(string), "*** %s killed %s. (%s)", killer, name, deathreason); } else { format(string, sizeof(string), "*** %s killed %s.", killer, name); } } SendClientMessageToAll(COLOR_RED, string); { playercash = GetPlayerMoney(playerid); if (playercash > 0) { GivePlayerMoney(killerid, playercash); ResetPlayerMoney(playerid); } else { } } return 1; }*/