Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(PlayerInfo[giveplayerid][pConnectTime] < 1 || PlayerInfo[giveplayerid][pWRestricted] > 0 || PlayerInfo[giveplayerid][pDonateRank] > 2) return GiftPlayer(playerid, giveplayerid);
- #define GivePlayerValidWeapon
- GivePlayerValidWeapon(giveplayerid, 27, 60000);
- GivePlayerValidWeapon(giveplayerid, 24, 60000);
- GivePlayerValidWeapon(giveplayerid, 31, 60000);
- GivePlayerValidWeapon(giveplayerid, 34, 60000);
- #define GetPlayerNameEx
- GivePlayerValidWeapon(giveplayerid, 29, 60000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a full weapon set!");
- format(string, sizeof(string), "* %s was just gifted a full weapon set, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 2)
- {
- #define GetPlayerNameEx
- if(PlayerInfo[giveplayerid][pDonateRank] > 2) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pFirstaid]++;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a first aid kit!");
- format(string, sizeof(string), "* %s was just gifted a first aid kit, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- #define GetPlayerNameEx
- else if(gift == 3)
- {
- PlayerInfo[giveplayerid][pMats] += 2000;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 2,000 materials!");
- format(string, sizeof(string), "* %s was just gifted 2,000 materials, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 4)
- {
- if(PlayerInfo[giveplayerid][pWarns] != 0)
- {
- PlayerInfo[giveplayerid][pWarns]--;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a single warning removal!");
- format(string, sizeof(string), "* %s was just gifted a single warning removal, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else
- {
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, "Random gift ended up in a removal of one warning - let's try again!");
- GiftPlayer(playerid, giveplayerid);
- return 1;
- }
- }
- else if(gift == 5)
- {
- PlayerInfo[giveplayerid][pPot] += 50;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 50 grams of pot!");
- format(string, sizeof(string), "* %s was just gifted 50 grams of pot, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 6)
- {
- PlayerInfo[giveplayerid][pCrack] += 25;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 25 grams of crack!");
- format(string, sizeof(string), "* %s was just gifted 25 grams of crack, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 7)
- {
- GivePlayerCash(giveplayerid, 20000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $20,000!");
- format(string, sizeof(string), "* %s was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 8)
- {
- PlayerInfo[giveplayerid][pPaintTokens] += 10;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 paintball tokens!");
- format(string, sizeof(string), "* %s was just gifted 10 paintball tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 9)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] < 1) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pTokens] += 5;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 5 VIP tokens!");
- format(string, sizeof(string), "* %s was just gifted 5 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 10)
- {
- PlayerInfo[giveplayerid][pFirework] += 2;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 2 Fireworks!");
- format(string, sizeof(string), "* %s was just gifted 2 Fireworks, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 11)
- {
- PlayerInfo[giveplayerid][pExp] += 5;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 5 Respect Points!");
- format(string, sizeof(string), "* %s was just gifted 5 Respect Points, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(randgift > 83 && randgift <= 98)
- {
- new gift = Random(1, 9);
- if(gift == 1)
- {
- GivePlayerCash(giveplayerid, 150000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $150,000!");
- format(string, sizeof(string), "* %s was just gifted $150,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 2)
- {
- PlayerInfo[giveplayerid][pMats] += 15000;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 15,000 materials!");
- format(string, sizeof(string), "* %s was just gifted 15,000 materials, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 3)
- {
- PlayerInfo[giveplayerid][pExp] += 10;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 respect points!");
- format(string, sizeof(string), "* %s was just gifted 10 respect points, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 4)
- {
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a free car!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded, contact Shop Techs.");
- format(PlayerInfo[giveplayerid][pFlag], 128, "Free Car (Gift)");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won a free car.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 4);
- if(playerid != MAX_PLAYERS)
- {
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won a free car(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- } else {
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s was just gifted by the system and he won a free car(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- }
- format(string, sizeof(string), "* %s was just gifted a free car, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 5)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] > 0)
- {
- PlayerInfo[giveplayerid][pTokens] += 15;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 15 VIP tokens!");
- format(string, sizeof(string), "* %s was just gifted 15 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else
- {
- PlayerInfo[giveplayerid][pDonateRank] = 1;
- PlayerInfo[giveplayerid][pTempVIP] = 10800;
- PlayerInfo[giveplayerid][pBuddyInvited] = 1;
- format(string, sizeof(string), "You have been invited to become a Level 1 VIP for 3 hours. Enjoy!", GetPlayerNameEx(giveplayerid));
- SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "BUDDY INVITE: %s has won a buddyinvite.", GetPlayerNameEx(giveplayerid));
- Log("logs/setvip.log", string);
- format(string, sizeof(string), "* %s was just gifted 3 hours of VIP, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(gift == 6)
- {
- PlayerToyInfo[giveplayerid][4][ptModelID] = 18643;
- PlayerToyInfo[giveplayerid][4][ptBone] = 6;
- PlayerToyInfo[giveplayerid][4][ptPosX] = 0.0;
- PlayerToyInfo[giveplayerid][4][ptPosY] = 0.0;
- PlayerToyInfo[giveplayerid][4][ptPosZ] = 0.0;
- PlayerToyInfo[giveplayerid][4][ptRotX] = 0.0;
- PlayerToyInfo[giveplayerid][4][ptRotY] = 0.0;
- PlayerToyInfo[giveplayerid][4][ptRotZ] = 0.0;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a Free Laser Pointer!");
- format(string, sizeof(string), "* %s was just gifted a Free Laser Pointer, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 7)
- {
- if(PlayerInfo[giveplayerid][pADMuteTotal] < 1) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pADMuteTotal] = 0;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a Free Admute Reset!");
- format(string, sizeof(string), "* %s was just gifted a Free Admute Reset, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 8)
- {
- if(PlayerInfo[giveplayerid][pNMuteTotal] < 1) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pNMuteTotal] = 0;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a Free Nmute Reset!");
- format(string, sizeof(string), "* %s was just gifted a Free Nmute Reset, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- else if(randgift > 98 && randgift <= 100)
- {
- new gift = Random(1, 6);
- if(gift == 1 && PlayerInfo[giveplayerid][pDonateRank] <= 2) // Silver VIP can get it extended, I suppose
- {
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won one month of Silver VIP!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
- format(PlayerInfo[giveplayerid][pFlag], 128, "Free Silver VIP (Gift)");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won one month of Silver VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won one month of Silver VIP(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- format(string, sizeof(string), "* %s was just gifted one month of Silver VIP, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 2)
- {
- if(playerid != MAX_PLAYERS)
- {
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won a free house(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- } else {
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s was just gifted by the system and he won a free house(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- }
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a free house!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
- format(PlayerInfo[giveplayerid][pFlag], 128, "Free House (Gift)");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won a free house.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- format(string, sizeof(string), "* %s was just gifted a free house, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 3)
- {
- if(PlayerInfo[giveplayerid][pDonateRank] < 1) return GiftPlayer(playerid, giveplayerid);
- PlayerInfo[giveplayerid][pTokens] += 50;
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 50 VIP tokens!");
- format(string, sizeof(string), "* %s was just gifted 50 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 4)
- {
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won $500,000. (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- GivePlayerCash(giveplayerid, 500000);
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $500,000!");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won $500,000.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- format(string, sizeof(string), "* %s was just gifted $500,000, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(gift == 5)
- {
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won one month of Gold VIP!");
- SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
- format(PlayerInfo[giveplayerid][pFlag], 128, "Free Gold VIP (Gift)");
- format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won one month of Gold VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- ABroadCast(COLOR_YELLOW, string, 2);
- new year,month,day,log[128];
- getdate(year, month, day);
- format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won one month of Gold VIP(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
- Log("logs/gifts.log", log);
- format(string, sizeof(string), "* %s was just gifted one month of Gold VIP, enjoy!", GetPlayerNameEx(giveplayerid));
- ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- }
- PlayerInfo[giveplayerid][pGiftTime] = 300;
- }
- return 1;
- }
- WeedLogin(playerid)
- {
- if(PlayerInfo[playerid][pWExists])
- {
- PlayerInfo[playerid][pWObject] = CreateDynamicObject(3409, PlayerInfo[playerid][pWX], PlayerInfo[playerid][pWY], PlayerInfo[playerid][pWZ], 0.0, 0.0, 0.0, PlayerInfo[playerid][pWVW], PlayerInfo[playerid][pWInt]);
- PlayerInfo[playerid][pWTimer] = SetTimerEx("WeedGrowth", 60000, 1, "i", playerid);
- return 1;
- }
- return 1;
- }
- WeedLogout(WeedID)
- {
- if(PlayerInfo[WeedID][pWExists])
- {
- KillTimer(PlayerInfo[WeedID][pWTimer]);
- DestroyDynamicObject(PlayerInfo[WeedID][pWObject]);
- return 1;
- }
- return 1;
- }
- ClearWeed(WeedID)
- {
- KillTimer(PlayerInfo[WeedID][pWTimer]);
- DestroyDynamicObject(PlayerInfo[WeedID][pWObject]);
- //Delete3DTextLabel(PlayerInfo[WeedID][pW3DText]);
- PlayerInfo[WeedID][pWX] = 0.0;
- PlayerInfo[WeedID][pWY] = 0.0;
- PlayerInfo[WeedID][pWZ] = 0.0;
- PlayerInfo[WeedID][pWValue] = 0;
- PlayerInfo[WeedID][pWExists] = 0;
- return 1;
- }
- Float:GetDistance( Float: x1, Float: y1, Float: z1, Float: x2, Float: y2, Float: z2 )
- {
- new Float:d;
- d += floatpower(x1-x2, 2.0 );
- d += floatpower(y1-y2, 2.0 );
- d += floatpower(z1-z2, 2.0 );
- d = floatsqroot(d);
- return d;
- }
- SurfingCheck(vehicleid)
- {
- foreach(Player, p)
- {
- if(GetPlayerSurfingVehicleID(p) == vehicleid)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(p, x, y, z);
- SetPVarFloat(p, "tempPosX", x);
- SetPVarFloat(p, "tempPosY", x);
- SetPVarFloat(p, "tempPosZ", x);
- SetTimerEx("SurfingFix", 2000, 0, "i", p);
- }
- }
- }
- forward SurfingFix(playerid);
- public SurfingFix(playerid)
- {
- SetPlayerPos(playerid, GetPVarFloat(playerid, "tmpPosX"), GetPVarFloat(playerid, "tmpPosY"), GetPVarFloat(playerid, "tmpPosZ"));
- DeletePVar(playerid, "tmpPosX");
- DeletePVar(playerid, "tmpPosY");
- DeletePVar(playerid, "tmpPosZ");
- return 1;
- }
- forward IsAtTruckDeliveryPoint(playerid);
- IsAtTruckDeliveryPoint(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 6, 920.421142, -1361.637084, 13.003659) || IsPlayerInRangeOfPoint(playerid, 6, 1197.744384, -886.373901, 42.819854) ||
- IsPlayerInRangeOfPoint(playerid, 6, 2111.115722, -1783.749877, 13.188007) || IsPlayerInRangeOfPoint(playerid, 6, 2236.051757, -1690.114990, 13.744861) ||
- IsPlayerInRangeOfPoint(playerid, 6, 454.168640, -1501.456909, 30.757781) || IsPlayerInRangeOfPoint(playerid, 6, 2111.877929, -1218.093139, 23.604995) ||
- IsPlayerInRangeOfPoint(playerid, 6, 2197.721923, -1975.567260, 13.359717) || IsPlayerInRangeOfPoint(playerid, 6, 1339.484497, -1763.289916, 13.332603) ||
- IsPlayerInRangeOfPoint(playerid, 6, 1003.885925, -906.400634, 41.986915) || IsPlayerInRangeOfPoint(playerid, 6, 1837.636108, -1832.414062, 13.385854) ||
- IsPlayerInRangeOfPoint(playerid, 6, 2781.596435, -2494.261230, 13.457942) || IsPlayerInRangeOfPoint(playerid, 6, 2443.682373, -1426.901489, 23.796508) ||
- IsPlayerInRangeOfPoint(playerid, 6, 2166.486083, -2273.158935, 13.166786))
- { return true; }
- return false;
- }
- forward CancelTruckDelivery(playerid);
- CancelTruckDelivery(playerid)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(IsATruckerCar(vehicleid)) SetVehicleToRespawn(vehicleid);
- }
- DestroyProgressBar(LoadTruckBar[playerid]);
- LoadTruckBar[playerid] = INVALID_BAR_ID;
- LoadTruckTime[playerid] = 0;
- DeletePVar(playerid, "TruckDeliver");
- TruckContents[TruckUsed[playerid]] = 0;
- TruckUsed[playerid] = INVALID_VEHICLE_ID;
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- InvalidModCheck(model, partid) {
- switch(model) {
- case 430, 446, 452, 453, 454, 472, 473, 484, 493, 595, 573, 556, 557, 539, 471, 432, 406, 444,
- 448, 461, 462, 463, 468, 481, 509, 510, 521, 522, 581, 586, 417, 425, 447, 460, 469, 476, 487,
- 488, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593: return 0;
- default: switch(GetVehicleComponentType(partid)) {
- case 5: switch(partid) {
- case 1008, 1009, 1010: return 1;
- default: return 0;
- }
- case 7: switch(partid) {
- case 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1096, 1097, 1098, 1025: return 1;
- default: return 0;
- }
- case 8: switch(partid) {
- case 1086: return 1;
- default: return 0;
- }
- case 9: switch(partid) {
- case 1087: return 1;
- default: return 0;
- }
- default: for(new i; i < 4; i++) if(partid == vehicleMods[model - 400][GetVehicleComponentType(partid)][i]) {
- return 1;
- }
- }
- }
- return 0;
- }
- JudgeOnlineCheck()
- {
- new count;
- foreach(Player, i)
- {
- if(PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pLeader] == 5)
- {
- count++;
- }
- }
- return count;
- }
- stock StopRefueling(playerid)
- {
- GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
- SendFormattedMessage(playerid, COLOR_WHITE,"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
- new mypoint = -1;
- for (new i=0; i<MAX_POINTS; i++)
- {
- if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
- {
- mypoint = i;
- }
- }
- for(new i = 0; i < sizeof(FamilyInfo); i++)
- {
- if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
- {
- FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
- }
- }
- RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
- return true;
- }
- IsAtFuelStation(playerid)
- {
- new Float:X, Float:Y, Float:Z;
- GetObjectPos(Carrier[0], X, Y, Z);
- if(IsPlayerInRangeOfPoint(playerid,10,1595.5406, 2198.0520, 10.3863) || IsPlayerInRangeOfPoint(playerid,10,2202.0649, 2472.6697, 10.5677) ||
- IsPlayerInRangeOfPoint(playerid,10,2115.1929, 919.9908, 10.5266) || IsPlayerInRangeOfPoint(playerid,10,2640.7209, 1105.9565, 10.5274) ||
- IsPlayerInRangeOfPoint(playerid,10,608.5971, 1699.6238, 6.9922) || IsPlayerInRangeOfPoint(playerid,10,618.4878, 1684.5792, 6.9922) ||
- IsPlayerInRangeOfPoint(playerid,10,2146.3467, 2748.2893, 10.5245) || IsPlayerInRangeOfPoint(playerid,10,-1679.4595, 412.5129, 6.9973) ||
- IsPlayerInRangeOfPoint(playerid,10,-1327.5607, 2677.4316, 49.8093) || IsPlayerInRangeOfPoint(playerid,10,-1470.0050, 1863.2375, 32.3521) ||
- IsPlayerInRangeOfPoint(playerid,10,-2409.2200, 976.2798, 45.2969) || IsPlayerInRangeOfPoint(playerid,10,-2244.1396, -2560.5833, 31.9219) ||
- IsPlayerInRangeOfPoint(playerid,10,-1606.0544, -2714.3083, 48.5335) || IsPlayerInRangeOfPoint(playerid,10,1937.4293, -1773.1865, 13.3828) ||
- IsPlayerInRangeOfPoint(playerid,10,-91.3854, -1169.9175, 2.4213) || IsPlayerInRangeOfPoint(playerid,10,1383.4221, 462.5385, 20.1506) ||
- IsPlayerInRangeOfPoint(playerid,10,660.4590, -565.0394, 16.3359) || IsPlayerInRangeOfPoint(playerid,10,1381.7206, 459.1907, 20.3452) ||
- IsPlayerInRangeOfPoint(playerid,10,-1605.7156, -2714.4573, 48.5335) || IsPlayerInRangeOfPoint(playerid,20,1882.2546,-2393.9824,16.5144) ||
- IsPlayerInRangeOfPoint(playerid,10,1386.5360,-271.5511,-0.4857) || IsPlayerInRangeOfPoint(playerid,10,2017.3016,-229.9219,-0.2183) ||
- IsPlayerInRangeOfPoint(playerid,10,279.1325,1940.4025,17.6406) || IsPlayerInRangeOfPoint(playerid,250,X, Y, Z))
- { return true; }
- return false;
- }
- forward ReFill(playerid);
- public ReFill(playerid)
- {
- if(!IsAtFuelStation(playerid) || !IsPlayerInAnyVehicle(playerid) || VehicleFuel[GetPlayerVehicleID(playerid)] >= 100.0 || GetPlayerCash(playerid) < 1)
- {
- StopRefueling(playerid);
- }
- else
- {
- new engine,lights,alarm,doors,bonnet,boot,objective;
- GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
- if(engine == VEHICLE_PARAMS_ON) return StopRefueling(playerid);
- VehicleFuel[GetPlayerVehicleID(playerid)] += 1.0; RefuelingVehiclePrice[playerid] += 30;
- if(VehicleFuel[GetPlayerVehicleID(playerid)] >= 100.0) VehicleFuel[GetPlayerVehicleID(playerid)] = 100.0;
- }
- return true;
- }
- public Audio_OnClientConnect(playerid)
- {
- new string[128];
- format(string,sizeof(string),"(Audio Plugin) %s(%d) has connected to the audio server.",GetPlayerNameEx(playerid),playerid);
- SendClientMessageEx(playerid, 0xA9C4E4FF, string);
- SendClientMessageEx(playerid, 0xA9C4E4FF, "(Audio Plugin) Checking and downloading audio files, Please wait...");
- Audio_TransferPack(playerid);
- return 1;
- }
- public Audio_OnPlay(playerid, handleid)
- {
- //new string[128];
- //format(string, sizeof(string), "(Audio Plugin) Debug: Audio playback started for handle ID %d.", handleid);
- //SendClientMessage(playerid, 0xA9C4E4FF, string);
- }
- public Audio_OnStop(playerid, handleid)
- {
- //new string[128];
- //format(string, sizeof(string), "(Audio Plugin) Debug: Audio playback stopped for handle ID %d.", handleid);
- //SendClientMessage(playerid, 0xA9C4E4FF, string);
- }
- public Audio_OnTransferFile(playerid, file[], current, total, result)
- {
- if (current == total)
- {
- SendClientMessageEx(playerid, 0xA9C4E4FF, "(Audio Plugin) All audio files have been downloaded and processed, Thank you!");
- SendAudioToPlayer(playerid, 1183, 100, 0);
- }
- return 1;
- }
- public Audio_OnSetPack(audiopack[])
- {
- foreach(Player, i)
- {
- Audio_TransferPack(i);
- }
- return 1;
- }
- public Audio_OnClientDisconnect(playerid)
- {
- new string[128];
- format(string,sizeof(string),"(Audio Plugin) %s(%d) has disconnected from the audio server.",GetPlayerNameEx(playerid),playerid);
- SendClientMessageEx(playerid, 0xA9C4E4FF, string);
- return 1;
- }
- public Audio_OnTrackChange(playerid, handleid, track[])
- {
- new string[128];
- //format(string, sizeof(string), "(Audio Plugin) Debug: Now playing \"%s\" for handle ID %d.", track, handleid);
- //SendClientMessage(playerid, 0xA9C4E4FF, string);
- format(string, sizeof(string), "* Now Playing: %s.",track);
- SendClientMessageEx(playerid, COLOR_PURPLE, string);
- return 1;
- }
- SendBlankAudioTick(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Audio_IsClientConnected(playerid))
- {
- new handleid = Audio_Play(playerid, 1, false, false, false);
- Audio_SetVolume(playerid, handleid, 0);
- }
- else
- {
- return 0;
- }
- }
- return 1;
- }
- forward SendAudioToPlayer(playerid, audioid, volume, seek);
- public SendAudioToPlayer(playerid, audioid, volume, seek)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Audio_IsClientConnected(playerid))
- {
- new localhandle = Audio_Play(playerid,audioid,false,false,false);
- Audio_SetVolume(playerid, localhandle, volume);
- Audio_Seek(playerid, localhandle, seek);
- }
- else
- {
- return 0;
- }
- }
- return 1;
- }
- SendAudioToRange(audioid, volume, seek, Float:x, Float:y, Float:z, Float:range)
- {
- if(audiohandleglobal >= 99)
- {
- audiohandleglobal = 0;
- }
- forward Audio_OnSetPack(audiopack[]);
- public Audio_OnSetPack(audiopack[])
- {
- foreach(Player, i)
- {
- Audio_TransferPack(i);
- }
- return 1;
- }
- SendAudioToRange(audioid, volume, seek, Float:x, Float:y, Float:z, Float:range)
- {
- #pragma unused seek
- if(audiohandleglobal >= 99)
- {
- audiohandleglobal = 0;
- }
- else
- {
- audiohandleglobal++;
- }
- foreach(Player, i)
- {
- if(IsPlayerConnected(i))
- {
- if(Audio_IsClientConnected(i))
- {
- if(IsPlayerInRangeOfPoint(i,range,x,y,z))
- {
- new localhandle = Audio_Play(i,audioid,false,false,false);
- Audio_Set3DPosition(i, localhandle, x, y, z, range);
- Audio_SetVolume(i, localhandle, volume);
- //Audio_SetPosition(i, localhandle, seek);
- audiohandle[i][audiohandleglobal] = localhandle;
- }
- }
- }
- }
- return audiohandleglobal;
- }
- stock SendAudioURLToRange(url[], volume, seek, Float:x, Float:y, Float:z, Float:range)
- {
- #pragma unused seek
- if(audiohandleglobal >= 99)
- {
- audiohandleglobal = 0;
- }
- else
- {
- audiohandleglobal++;
- }
- foreach(Player, i)
- {
- if(IsPlayerConnected(i))
- {
- if(Audio_IsClientConnected(i))
- {
- if(IsPlayerInRangeOfPoint(i,range,x,y,z))
- {
- new localhandle = Audio_PlayStreamed(i,url,false,false,false);
- Audio_Set3DPosition(i, localhandle, x, y, z, range);
- Audio_SetVolume(i, localhandle, volume);
- //Audio_SetPosition(i, localhandle, seek);
- audiohandle[i][audiohandleglobal] = localhandle;
- }
- }
- }
- }
- return audiohandleglobal;
- }
- if(PlayerInfo[playerid][pCarLic] == 0) return SendClientMessageEx(playerid, COLOR_RED, "You're driving without a drivers license. Obtain one from City Hall!");
- new rand = random(2); //DELETE THIS LINE!!
- if(PlayerInfo[playerid][pModel] == 299) {
- new IsAtNameChange; //DELETE THIS LINE!!
- forward SetVehicleEngine(vehicleid, playerid);
- public SetVehicleEngine(vehicleid, playerid)
- {
- new string[128];
- new engine,lights,alarm,doors,bonnet,boot,objective;
- GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
- if(engine == VEHICLE_PARAMS_ON)
- {
- SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
- SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine stopped successfully.");
- DeletePVar(playerid, "fuelonoff");
- DestroyProgressBar(FuelBar[playerid]);
- textdrawscount--;
- FuelBar[playerid] = INVALID_BAR_ID;
- arr_Engine{vehicleid} = 0;
- }
- else if(engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)
- {
- new
- Float: f_vHealth;
- GetVehicleHealth(vehicleid, f_vHealth);
- if(f_vHealth < 350.0) return SendClientMessageEx(playerid, COLOR_RED, "The car won't start - it's totalled!");
- if(VehicleFuel[vehicleid] <= 0.0) return SendClientMessageEx(playerid, COLOR_RED, "The car won't start - there's no fuel in the tank!");
- SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
- SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine started successfully (/car engine to turn the engine off).");
- if(PlayerInfo[playerid][pCarLic] = 0) return SendClientMessageEx(playerid, COLOR_RED, "You're driving without a drivers license. Obtain one from City Hall!");
- arr_Engine{vehicleid} = 1;
- if(GetChased[playerid] < 999 && VehicleBomb[vehicleid] == 1)
- {
- if(PlayerInfo[playerid][pHeadValue] >= 1)
- {
- if(PlayerInfo[GetChased[playerid]][pMember] == 8 || PlayerInfo[GetChased[playerid]][pLeader] == 8)
- {
- new Float:boomx, Float:boomy, Float:boomz;
- GetPlayerPos(playerid,boomx, boomy, boomz);
- CreateExplosion(boomx, boomy , boomz, 7, 1);
- VehicleBomb[vehicleid] = 0;
- PlacedVehicleBomb[GetChased[playerid]] = INVALID_VEHICLE_ID;
- new takemoney = PlayerInfo[playerid][pHeadValue] / 4 * 2;
- GivePlayerCash(GetChased[playerid], takemoney);
- GivePlayerCash(playerid, -takemoney);
- format(string,sizeof(string),"Hitman %s has fulfilled the contract on %s and collected $%d.",GetPlayerNameEx(GetChased[playerid]),GetPlayerNameEx(playerid),PlayerInfo[playerid][pHeadValue] / 4 * 2);
- SendFamilyMessage(8, COLOR_YELLOW, string);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement