⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gf.pwn

📁 著名网络游戏
💻 PWN
📖 第 1 页 / 共 5 页
字号:
print(" By: Fear & parts of Astro");
print(" ");
}

//------------------------------------------------------------------------------------------------------

public SearchingHit(playerid)
{
	new string[256];
	new giveplayer[MAX_PLAYER_NAME];
	new searchhit = 0;
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(searchhit == 0)
		    {
			    if(PlayerInfo[i][pHeadValue] > 0 && GotHit[i] == 0 && PlayerInfo[i][pMember] != 8)
			    {
			        GetPlayerName(i, giveplayer, sizeof(giveplayer));
			        searchhit = 1;
			        hitfound = 1;
			        hitid = i;
			        for(new k=0; k<MAX_PLAYERS; k++)
					{
						if(IsPlayerConnected(k))
						{
				        	if(PlayerInfo[k][pMember] == 8 || PlayerInfo[k][pLeader] == 8)
				        	{
	               				SendClientMessage(k, COLOR_WHITE, "|__________________ Hitman Agency News __________________|");
				                SendClientMessage(k, COLOR_DBLUE, "*** Incoming Message: A Hit has become available. ***");
				                format(string, sizeof(string), "Person: %s   ID: %d   Value: $%d", giveplayer, i, PlayerInfo[i][pHeadValue]);
								SendClientMessage(k, COLOR_DBLUE, string);
								SendClientMessage(k, COLOR_YELLOW, "Use Givehit hitmanid, to assign the Contract to one of the Hitmans.");
								SendClientMessage(k, COLOR_WHITE, "|________________________________________________________|");
	      					}
					    }
					}
					return 0;
			    }
			}
		}
	}
	if(searchhit == 0)
	{
	    SendClientMessage(playerid, COLOR_GREY, "   No Contracts available !");
	}
	return 0;
}

public ExtortionBiz(bizid, money)
{
    new string[256];
    format(string, sizeof(string), "No-one");
    if(strcmp(BizzInfo[bizid][bExtortion],string, true ) == 0 )
	{
	    return 0;
	}
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        new name[MAX_PLAYER_NAME];
			new wstring[MAX_PLAYER_NAME];
			GetPlayerName(i, name, sizeof(name));
			format(string, sizeof(string), "%s", name);
			strmid(wstring, string, 0, strlen(string), 255);
			if(strcmp(BizzInfo[bizid][bExtortion] ,wstring, true ) == 0 )
			{
			    new value = money / 100;
			    value = value * 10;
			    GivePlayerMoney(i, value);
			    BizzInfo[bizid][bTill] -= value;
			}
		}
	}
	return 1;
}

public ExtortionSBiz(bizid, money)
{
    new string[256];
    format(string, sizeof(string), "No-one");
    if(strcmp(SBizzInfo[bizid][sbExtortion],string, true ) == 0 )
	{
	    return 0;
	}
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        new name[MAX_PLAYER_NAME];
			new wstring[MAX_PLAYER_NAME];
			GetPlayerName(i, name, sizeof(name));
			format(string, sizeof(string), "%s", name);
			strmid(wstring, string, 0, strlen(string), 255);
			if(strcmp(SBizzInfo[bizid][sbExtortion] ,wstring, true ) == 0 )
			{
			    new value = money / 100;
			    value = value * 10;
			    GivePlayerMoney(i, value);
			    SBizzInfo[bizid][sbTill] -= value;
			}
		}
	}
	return 1;
}

public PreparePaintball()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerPaintballing[i] != 0)
	        {
	            SendClientMessage(i, COLOR_YELLOW, "Paintball Match will start in 20 seconds.");
	        }
		}
	}
 	SetTimer("StartPaintball", 20000, 0);
	return 1;
}

public StartPaintball()
{
	PaintballRound = 1;
	StartingPaintballRound = 0;
	PaintballWinner = 999;
	PaintballWinnerKills = 0;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerPaintballing[i] != 0)
	        {
	            ResetPlayerWeapons(i);
	            GivePlayerWeapon(i, 29, 999);
	            TogglePlayerControllable(i, 1);
	            SendClientMessage(i, COLOR_YELLOW, "Paintball Match started, 4 minutes left.");
	            PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
	        }
	    }
	}
	SetTimer("PaintballEnded", 240000, 0);
	return 1;
}

public PaintballEnded()
{
	new string[256];
	new name[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerPaintballing[i] != 0)
	        {
	            if(IsPlayerConnected(PaintballWinner))
	            {
	                GetPlayerName(PaintballWinner, name, sizeof(name));
	                format(string,sizeof(string), "** %s won the Paintball Match with %d kills **",name,PaintballWinnerKills);
	                SendClientMessage(i, COLOR_WHITE, string);
	            }
	            ResetPlayerWeapons(i);
	            PlayerPaintballing[i] = 0;
	            SetPlayerPos(i, SBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
	        }
		}
	}
	AnnouncedPaintballRound = 0;
    PaintballRound = 0;
	return 1;
}

public PrepareKarting()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
	        {
	            CP[i] = 9;
				SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
				SendClientMessage(i, COLOR_YELLOW, "Kart Race will start in 20 seconds, go to the starting line.");
	        }
		}
	}
	SetTimer("StartKarting", 20000, 0);
	return 1;
}

public StartKarting()
{
	KartingRound = 1;
	StartingKartRound = 0;
	EndingKartRound = 0;
	FirstKartWinner = 999;
	SecondKartWinner = 999;
	ThirdKartWinner = 999;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
	        {
	            CP[i] = 10;
	            SendClientMessage(i, COLOR_YELLOW, "Green light, go go go !");
	            PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
	            SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
	        }
	    }
	}
	SetTimer("KartingEnded", 240000, 0);
	return 1;
}

public KartingEnded()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
	        {
	            CP[i] = 0;
	            DisablePlayerCheckpoint(i);
	        }
		}
	}
	AnnouncedKartRound = 0;
    KartingRound = 0;
	return 1;
}

public DollahScoreUpdate()
{
	new LevScore;
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
   			LevScore = PlayerInfo[i][pLevel];
			SetPlayerScore(i, LevScore);
		}
	}
	return 1;
}

public Encrypt(string[])
{
	for(new x=0; x < strlen(string); x++)
	  {
		  string[x] += (3^x) * (x % 15);
		  if(string[x] > (0xff))
		  {
			  string[x] -= 256;
		  }
	  }
	return 1;
}

stock right(source[], len)
{
	new retval[MAX_STRING], srclen;
	srclen = strlen(source);
	strmid(retval, source, srclen - len, srclen, MAX_STRING);
	return retval;
}

public Spectator()
{
	new string[256];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(KickPlayer[i]==1) { Kick(i); }
			else if(KickPlayer[i]==2) { Ban(i); }
			//if(GetPlayerPing(i) >= 500 && PlayerInfo[i][pAdmin] < 1) { Kick(i); }
			if(Spectate[i] < 253 && Spectate[i] != 255)
			{
				SetPlayerColor(i,COLOR_SPEC);
				TogglePlayerControllable(i, 0);
				new targetid = Spectate[i];
				if(IsPlayerConnected(targetid))
				{
				    TogglePlayerSpectating(i, 1);
				    if(PlayerInfo[i][pAdmin] >= 1)
				    {
				        new Float:health;
					    new name[MAX_PLAYER_NAME];
					    GetPlayerName(targetid, name, sizeof(name));
					    GetPlayerHealth(targetid, health);
					    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~health:%.1f",name,targetid,health);
					    GameTextForPlayer(i, string, 2500, 3);
				    }
				    if(IsPlayerInAnyVehicle(targetid))
					{
					    new carid = GetPlayerVehicleID(targetid);
					    PlayerSpectateVehicle(i, carid);
					}
					else
					{
					    PlayerSpectatePlayer(i, targetid);
					}
					if(GetPlayerInterior(targetid) == 0)
					{
						SetPlayerInterior(i,0);
					}
					else if(GetPlayerInterior(targetid) > 0)
					{
						SetPlayerInterior(i,GetPlayerInterior(targetid));
					}
				}//Targetid connected
			}
			if(Spectate[i] == 253)
			{
				TogglePlayerControllable(i, 1);
				TogglePlayerSpectating(i, 0);
				SetPlayerInterior(i,Unspec[i][sPint]);
				PlayerInfo[i][pInt] = Unspec[i][sPint];
				PlayerInfo[i][pLocal] = Unspec[i][sLocal];
				Unspec[i][sLocal] = 255;
				SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][sPx],  Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
				gTeam[i] = PlayerInfo[i][pTeam];
				SetPlayerToTeamColor(i);
				MedicBill[i] = 0;
				if(PlayerInfo[i][pDonateRank] > 0)
		        {
		            SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][Coords][0], Unspec[i][Coords][1], Unspec[i][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
					SpawnPlayer(i);
					SetCameraBehindPlayer(i);
		        }
		        else
		        {
					SpawnPlayer(i);
				}
				Spectate[i] = 255;
			}
			if(Spectate[i] == 254)
			{
				TogglePlayerControllable(i, 1);
				SetPlayerInterior(i,Unspec[i][sPint]);
				PlayerInfo[i][pInt] = Unspec[i][sPint];
				PlayerInfo[i][pLocal] = Unspec[i][sLocal];
				SetPlayerPos(i, Unspec[i][sPx],  Unspec[i][sPy], Unspec[i][sPz]);
				Spectate[i] = 255;
			}
			if(Spectate[i] == 256)
			{
				SetPlayerToTeamColor(i);
				Spectate[i] = 255;
			}
			if(Spectate[i] == 257)
			{
				Spectate[i] = 254;
			}
		}
	}
}

//------------------------------------------------------------------------------------------------------

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(gTeam[playerid] >= 3)
	{
		if (IsACopCar(vehicleid) && !ispassenger)
		{
			if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3) {}
		    else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); }
		}
		if (IsAnAmbulance(vehicleid) && !ispassenger)
		{
		    if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
		    else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
		}
	}
	return 1;
}

public IsAnInstructor(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    new leader = PlayerInfo[playerid][pLeader];
	    new member = PlayerInfo[playerid][pMember];
	    if(member==11)
		{
		    return 1;
		}
		if(leader==11)
		{
		    return 1;
		}
	}
	return 0;
}

public IsAMember(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    new leader = PlayerInfo[playerid][pLeader];
	    new member = PlayerInfo[playerid][pMember];
	    if(member==5 || member==6 || member==8)
		{
		    return 1;
		}
		if(leader==5 || leader==6 || leader==8)
		{
		    return 1;
		}
	}
	return 0;
}

public IsACop(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    new leader = PlayerInfo[playerid][pLeader];
	    new member = PlayerInfo[playerid][pMember];
	    if(member==1 || member==2 || member==3)
		{
		    return 1;
		}
		else if(leader==1 || leader==2 || leader==3)
		{
		    return 1;
		}
	}
	return 0;
}

public IsAtClothShop(playerid)
{
    if(IsPlayerConnected(playerid))
	{
        if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
		{//Binco & Suburban
		    return 1;
		}
		else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
		{//Zip & Victim
		    return 1;
		}
	}
	return 0;
}

public IsAtGasStation(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
		{//LS
		    return 1;
		}
		else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -