Jump to content

Hulp nodig met me GM:S


Recommended Posts

Geplaatst:

Ik heb teamcolor's in me script maar hij spawnt als gewoon orange

en ik kan geen jetpack's oppaken:S

kan iemand me helpen? hier is het script:

/*
*       GangWars1.0
*     By Second
*/
#include <a_samp>
#include <utils>

#define COLOR_BLUE 0x0000FFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_ORANGE 0xFF9933AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLACK 0x2C2727AA
#define COLOR_LIGHTCYAN 0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357
#define COLOR_AQUA 0x7CFC00AA
#define COLOR_WHITEYELLOW 0xFFE87DFF
#define COLOR_BLUEAQUA 0x7E60FFFF
#define COLOR_DARKBLUE 0x15005EFF
#define COLOR_ALIEN 0x90FF87FF
#define COLOR_GOLD 0xB8860BAA
#define KICK_COLOR 0xFF0000FF
#define COLOR_GANGGREEN 0x00FF0096
#define COLOR_BLACK 0x2C2727AA
#define COLOR_SBLUE 0x00BFFFAA


#define TEAM_BALLAS 1
#define TEAM_GROVE 2
#define TEAM_VAGOS 3
#define TEAM_MOTOBIKERS 4
#define TEAM_LOS_AZTECAS 5
#define TEAM_COP 6
#define TEAM_NANG 7
#define TEAM_TRIAD 8
#define TEAM_RIFA 9






new Ballas;
new Vagos;
new Los_Aztecas;
new Grove_Street;
new cop;
new NANG;
new SFR;
new TRIAD;




#define COLOR_BALLAS 0x6F006FFF
#define COLOR_GROVE 0x008000FF
#define COLOR_VAGOS 0xFFFF00AA
#define COLOR_MOTOBIKERS 0x80400096
#define COLOR_LOS_AZTECAS 0x00E8E896
#define TEAM_CYAN_COLOR 0xFF8282AA
#define TEAM_COLOR_TRIAD 0x000000ff
#define COLOR_COP 0x0000FFAA
#define COLOR_NANG 0x993300AA
#define COLOR_RIFA 0x00BFFFAA

// DCMD
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

new gTeam[MAX_PLAYERS];

main()
{
print("\n  +------------------------------------------------+");
print("  |               Gangwar1.0                       |");
print("  |                   Second                       |");
print("  |                                                |");
print("  +------------------------------------------------+\n");
}



public OnGameModeInit()
{
   Grove_Street = GangZoneCreate(2197.193, -1768.712, 2516.631, -1571.325);
   UsePlayerPedAnims();
SetGameModeText("GangWar®");
SetTimer("AD",1800000,1); // 30 minutes
SetTimer("Respawn",5000,0); // 5 sec




   AddPlayerClass(102,1973.4797,-1224.1311,20.0234,2.8161,28,3000,5,1,22,3000); // ballas
   AddPlayerClass(103,1973.4797,-1224.1311,20.0234,2.8161,28,3000,5,1,22,3000); // ballas
   AddPlayerClass(104,1973.4797,-1224.1311,20.0234,2.8161,28,3000,5,1,22,3000); // ballas
   AddPlayerClass(271,2459.6799,-1690.5546,13.5416,352.9616,26,3000,32,3000,18,100); // ryder
   AddPlayerClass(270,2522.0486,-1679.1824,15.4970,72.5490,26,3000,32,3000,18,100); // sweet
   AddPlayerClass(0,2495.4314,-1686.7506,13.5150,356.5232,32,2000,26,4000,24,3000); // cj
   AddPlayerClass(269,2065.1926,-1703.2979,14.1484,267.1418,22,1500,32,1500,25,2000); //bigsmoke
   AddPlayerClass(293,2486.3799,-1644.5508,14.0772,184.1565,22,1500,32,1500,25,2000); //OGloc
   AddPlayerClass(195,2402.2219,-1715.8809,14.0179,179.8231,22,1500,32,1500,25,2000); //Denise
   AddPlayerClass(105,2495.4314,-1686.7506,13.5150,356.5232,32,1000,4,1,22,2000); // derest
   AddPlayerClass(106,2495.4314,-1686.7506,13.5150,356.5232,32,1000,4,1,22,2000); // derest
   AddPlayerClass(107,2495.4314,-1686.7506,13.5150,356.5232,32,1000,4,1,22,2000); // derest
   AddPlayerClass(292,1804.3469,-2124.2319,13.9424,358.0123,32,3500,24,2000,26,2000); // cesar
   AddPlayerClass(114,1764.9974,-1925.9731,13.5674,109.9159,22,2000,32,2000,27,750); // cesargang
   AddPlayerClass(115,1764.9974,-1925.9731,13.5674,109.9159,22,2000,32,2000,27,750); // cesargang
   AddPlayerClass(116,1764.9974,-1925.9731,13.5674,109.9159,22,2000,32,2000,27,750); // cesargang
   AddPlayerClass(108,2751.7432,-1951.4896,17.3203,265.7974,29,3000,24,2500,17,100); // vagos
   AddPlayerClass(109,2751.7432,-1951.4896,17.3203,265.7974,29,3000,24,2500,17,100); // vagos
   AddPlayerClass(265,1553.7938,-1676.0212,16.1953,92.2081,24,5000,26,6000,31,5000); //cop
   AddPlayerClass(266,1553.7938,-1676.0212,16.1953,92.2081,22,3000,24,4000,26,5000); //cop
   AddPlayerClass(267,1553.7938,-1676.0212,16.1953,92.2081,22,3000,24,4000,26,5000); //cop
   AddPlayerClass(281,1553.7938,-1676.0212,16.1953,92.2081,17,1000,22,2000,29,3000); //cop
   AddPlayerClass(282,1553.7938,-1676.0212,16.1953,92.2081,17,1000,22,2000,29,3000); //cop
   AddPlayerClass(283,1553.7938,-1676.0212,16.1953,92.2081,17,1000,22,2000,29,3000); //cop
   AddPlayerClass(284,1553.7938,-1676.0212,16.1953,92.2081,17,1000,22,2000,29,3000); //cop
   AddPlayerClass(117,-2181.3015,718.4678,53.8932,178.8223,5,1,28,3000,30,3000); // triads
   AddPlayerClass(118,-2181.3015,718.4678,53.8932,178.8223,5,1,28,3000,30,3000); // triads
   AddPlayerClass(120,-2181.3015,718.4678,53.8932,178.8223,5,1,28,3000,30,3000); // triads
   AddPlayerClass(294,-2181.3015,718.4678,53.8932,178.8223,22,5000,28,7000,30,7000); // WuZiMu
   AddPlayerClass(121,-2385.6895,2216.1501,4.9844,90.3845,5,1,28,3000,30,3000); // da nangboys
   AddPlayerClass(122,-2385.6895,2216.1501,4.9844,90.3845,5,1,28,3000,30,3000); // da nangboys
   AddPlayerClass(123,-2385.6895,2216.1501,4.9844,90.3845,5,1,28,3000,30,3000); // da nangboys
   AddPlayerClass(49,-2385.6895,2216.1501,4.9844,90.3845,22,5000,28,7000,30,7000); // SnakeHead
   AddPlayerClass(173,-2032.7367,161.6707,29.0461,270.5851,22,3000,28,3000,30,3000); // SFR
   AddPlayerClass(174,-2032.7367,161.6707,29.0461,270.5851,22,3000,28,3000,30,3000); // SFR
   AddPlayerClass(175,-2032.7367,161.6707,29.0461,270.5851,22,3000,28,3000,30,3000); // SFR
   AddPlayerClass(296,-2032.7367,161.6707,29.0461,270.5851,22,5000,28,7000,30,7000); // Leader_SFR
   TRIAD = GangZoneCreate(-2139.745, 598.0067, -1992.963, 1201.586);
   SFR = GangZoneCreate(-2251.763, -281.7203, -1792.104, 333.6941);
   Grove_Street = GangZoneCreate(1843.529, -1733.182, 2550.856, -1504.214);
   Los_Aztecas = GangZoneCreate(1672.401, -2171.382, 1961.417, -1851.615);
   Ballas = GangZoneCreate(1854.937, -1480.527, 2318.883, -1133.126);
   Vagos = GangZoneCreate(2615.505, -1895.04, 2889.309, -1658.175);
   Vagos = GangZoneCreate(2398.743, -2056.897, 2870.295, -1745.026);
   cop = GangZoneCreate(1421.414, -1733.182, 1702.824, -1587.116);
   NANG = GangZoneCreate(-2861.08, 2113.696, -2102.018, 2720.945);
   AddStaticVehicle(487,2529.4771,-1678.0613,20.1068,273.3699,86,86); //
   AddStaticVehicle(492,2489.7720,-1682.8259,13.1180,90.1584,86,86); //
   AddStaticVehicle(492,2508.2729,-1668.5603,13.1698,190.4371,86,86); //
   AddStaticVehicle(492,2484.1323,-1655.2524,13.1020,92.0801,86,86); //
   AddStaticVehicle(600,2473.1831,-1695.9736,13.2305,0.2506,3,3); //
   AddStaticVehicle(461,2502.4063,-1657.8375,12.9885,137.3496,86,86); //
   AddStaticVehicle(461,2479.8069,-1683.4835,12.9862,26.6253,86,86); //
   AddStaticVehicle(461,2478.6538,-1683.2235,12.9823,9.8809,86,86); //
   AddStaticVehicle(567,1793.5947,-2128.9153,13.4154,1.7941,42,42); // cesarcar
   AddStaticVehicle(567,1777.2489,-1932.6244,13.2546,277.9482,2,2); // gangcar
   AddStaticVehicle(567,1776.3438,-1909.1858,13.2538,271.6681,2,2); // gangcar
   AddStaticVehicle(567,1774.8927,-1895.7397,13.3337,182.1692,2,2); //
   AddStaticVehicle(461,1790.4210,-1882.7109,13.1535,268.3085,2,2); // gangmotor
   AddStaticVehicle(461,1809.8193,-1905.0179,13.1456,2.0571,2,2); // gangmotor
   AddStaticVehicle(461,1758.6577,-1906.3079,13.1598,275.1721,2,2); // gangmotor
   AddStaticVehicle(466,2068.1660,-1694.5077,13.2887,270.4269,86,86); //
   AddStaticVehicle(596,1535.8658,-1678.7654,13.1851,182.4931,0,1); //
   AddStaticVehicle(596,1535.9573,-1666.0786,13.1873,1.0670,0,1); // copcar
   AddStaticVehicle(497,1564.8549,-1612.1830,13.1834,86.8978,0,1); // copheli
   AddStaticVehicle(596,1585.3210,-1667.4821,5.6985,269.8156,0,1); //
   AddStaticVehicle(596,1600.2065,-1703.7831,5.6948,89.4951,0,1); //
   AddStaticVehicle(596,1578.8418,-1710.3326,5.6965,0.9483,0,1); //
   AddStaticVehicle(596,1530.2460,-1683.9303,5.6938,269.6299,0,1); //
   AddStaticVehicle(596,1538.2455,-1645.1511,5.6942,181.9131,0,1); //
   AddStaticVehicle(523,1599.7120,-1703.6462,5.4645,89.6441,6,25); // copmotor
   AddStaticVehicle(523,1575.3208,-1693.5455,5.7930,182.0400,6,25); // copmotor
   AddStaticVehicle(523,1552.2822,-1687.4515,5.7835,92.5650,6,25); // copmotor
   AddStaticVehicle(523,1552.3397,-1665.7308,5.7835,90.3447,6,25); // copmotor
   AddStaticVehicle(487,1798.5941,-1920.1831,12.9649,185.6103,2,2); // LAheli
   AddStaticVehicle(475,1524.3469,-1682.9617,13.2653,2.0586,86,86); // tenpennycar
   AddStaticVehicle(576,2765.0415,-1972.0745,13.0577,177.4043,6,6); //
   AddStaticVehicle(576,2774.9324,-1967.4805,13.0350,3.6906,6,6); //
   AddStaticVehicle(576,2756.8486,-1944.5737,13.1567,268.1401,6,6); //
   AddStaticVehicle(461,2752.5220,-1967.9735,13.1257,183.4491,6,6); //
   AddStaticVehicle(461,2752.3435,-1957.6091,13.1249,1.1709,6,6); //
   AddStaticVehicle(461,2786.1199,-1957.7064,13.1173,359.7246,6,6); //
   AddStaticVehicle(461,2786.5293,-1968.9647,13.1392,179.5371,6,6); //
   AddStaticVehicle(517,1959.2976,-1229.6384,19.7783,6.8482,85,85); //
   AddStaticVehicle(517,1985.3132,-1225.9736,19.9722,14.1753,85,85); //
   AddStaticVehicle(517,1981.7379,-1171.5703,20.0923,178.3595,85,85); //
   AddStaticVehicle(517,1957.2643,-1172.4431,20.0436,181.2561,85,85); //
   AddStaticVehicle(461,1982.0408,-1233.4717,19.6247,277.5583,85,85); //
   AddStaticVehicle(461,1964.7585,-1236.5999,19.6500,94.9169,85,85); //
   AddStaticVehicle(461,1959.8297,-1157.0743,20.5500,90.8144,85,85); //
   AddStaticVehicle(461,1978.6959,-1157.2517,20.5154,276.0108,85,85); //
   AddStaticVehicle(487,1948.9497,-1225.9858,20.0731,180.1093,85,85); // ballasheli
   AddStaticVehicle(487,2779.5193,-2016.3127,13.7327,99.0289,6,6); //
   CreatePickup(370, 23, 1766.6832,-1932.6007,13.5641); //jetpackLA
   CreatePickup(370, 23, 1964.7906,-1225.3918,20.0234);//jetpackball
   CreatePickup(370, 23, 2738.6941,-1945.1125,17.3203);//jetpackvag
   CreatePickup(370, 23, 2503.9729,-1679.4882,13.3801);//jetpackgrov
   CreatePickup(370, 23, 1552.4482,-1667.9301,13.5585);//jetpackcops
   CreatePickup(362, 23, 2847.2324,-2375.4839,20.2073);//minigun
   AddStaticVehicle(545,2406.9324,-1719.5057,13.4656,180.4101,86,86); //











print("  Team Deathmath Loaded !");
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
   SetPlayerTeamFromClass(playerid, classid);
   return 1;
}

forward SetPlayerTeamFromClass(playerid,classid);
public SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
    case 0..2:
    {
	    GameTextForPlayer(playerid, "~p~Ballas Team", 1500, 6);
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,2176.9158,-1676.7103,14.6513);
	    SetPlayerFacingAngle(playerid, 76.9820);
	    SetPlayerCameraPos(playerid, 2171.0,-1677.0,15.0);
	    SetPlayerCameraLookAt(playerid, 2171.0,-1677.0,15.0);
	    gTeam[playerid] = TEAM_BALLAS;
	    SetPlayerTeam(playerid,1);
	    ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
	 }
	 case 3..11:
	 {
	    GameTextForPlayer(playerid, "~g~~h~Grove Team", 1500, 6);
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,2508.1831,-1685.4116,13.5606);
	    SetPlayerFacingAngle(playerid, 82.79460);
	    SetPlayerCameraPos(playerid, 2498.9,-1686.1,13.4);
	    SetPlayerCameraLookAt(playerid, 2498.9,-1686.1,13.4);
	    gTeam[playerid] = TEAM_GROVE;
	    SetPlayerTeam(playerid,2);
	    ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
	}
	case 12..15:
	{
	    GameTextForPlayer(playerid, "~b~~h~~h~Los Aztecas Team", 1500, 6);
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,2070.6050,-1558.7876,13.4186);
	    SetPlayerFacingAngle(playerid, 30.1708);
	    SetPlayerCameraPos(playerid, 2068.0481,-1553.3025,17.7891);
	    SetPlayerCameraLookAt(playerid, 2070.6050,-1558.7876,13.4186);
	    gTeam[playerid] = TEAM_LOS_AZTECAS;
	    SetPlayerTeam(playerid,5);
	    ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
	    		}
	case 16..17:
	{
	    GameTextForPlayer(playerid, "~y~~h~Vagos Team", 1500, 6);
	    SetPlayerInterior(playerid,11);
	    SetPlayerPos(playerid,504.1758,-75.0687,998.7578);
	    SetPlayerFacingAngle(playerid, 338.1708);
	    SetPlayerCameraPos(playerid, 506.3455,-70.0537,999.6721);
	    SetPlayerCameraLookAt(playerid, 504.1758,-75.0687,998.7578);
	    gTeam[playerid] = TEAM_VAGOS;
	    SetPlayerTeam(playerid,3);
	    ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
	             }
	case 18..24:
	{
 		    GameTextForPlayer(playerid, "~b~~h~~h~Cop Team", 1500, 6);
	    SetPlayerInterior(playerid,0);
	    SetPlayerPos(playerid,1916.8322,-1418.4252,16.3594);
	    SetPlayerFacingAngle(playerid, 357.1708);
	    SetPlayerCameraPos(playerid, 1918.3374,-1405.3641,13.5703);
	    SetPlayerCameraLookAt(playerid, 1916.8322,-1418.4252,16.3594);
	    gTeam[playerid] = TEAM_COP;
	    SetPlayerTeam(playerid,6);
           ApplyAnimation(playerid,"GANGS","DEALER_DEAL",4.1,1,1,1,1,1);
                    }
	case 25..28:
    {
			GameTextForPlayer(playerid, "~n~~n~~n~~r~Triad", 500, 3);
			SetPlayerPos(playerid, 2183.969,-2243.625,18.51546);
			SetPlayerFacingAngle(playerid,135);
			SetPlayerCameraPos(playerid, 2177.969,-2247.625,21.51546);
			SetPlayerCameraLookAt(playerid, 2183.969,-2243.625,18.51546);
               gTeam[playerid] = TEAM_TRIAD;
	        SetPlayerTeam(playerid,;
			ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
	}
	case 29..32:
    {
			GameTextForPlayer(playerid, "~n~~n~~n~~r~Da Nang Boys", 500, 3);
			SetPlayerPos(playerid, 2183.969,-2243.625,18.51546);
			SetPlayerFacingAngle(playerid,135);
			SetPlayerCameraPos(playerid, 2177.969,-2247.625,21.51546);
			SetPlayerCameraLookAt(playerid, 2183.969,-2243.625,18.51546);
               gTeam[playerid] = TEAM_NANG;
	        SetPlayerTeam(playerid,7);
			ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
       }
	case 33..37:
    {
			GameTextForPlayer(playerid, "~n~~n~~n~~r~San Fierro Rifa", 500, 3);
			SetPlayerPos(playerid, 2183.969,-2243.625,18.51546);
			SetPlayerFacingAngle(playerid,135);
			SetPlayerCameraPos(playerid, 2177.969,-2247.625,21.51546);
			SetPlayerCameraLookAt(playerid, 2183.969,-2243.625,18.51546);
               gTeam[playerid] = TEAM_RIFA;
	        SetPlayerTeam(playerid,9);
			ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
	}




	}

	}





public OnPlayerConnect(playerid)
{
new s[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
SendClientMessage(playerid,COLOR_WHITE," ");
format(s,sizeof(s),"Hello %s, Cesar, Big Smoke, Ryder, CJ, Sweet, etc. are for CL, L and HL .",name);
SendClientMessage(playerid,COLOR_RED,s);
SendClientMessage(playerid,COLOR_WHITE," ");
SetPlayerScore(playerid,5);

return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
new string[256];
format(string,sizeof(string),"%s has left the server.",playerid);
SendClientMessageToAll(0xF58554FF,string);
   return 1;
}


public OnPlayerSpawn(playerid)
{
   GangZoneShowForPlayer(playerid, Grove_Street, 0x00FF4096);
   GangZoneShowForPlayer(playerid, Los_Aztecas, 0x00FFFF96);
   GangZoneShowForPlayer(playerid, Ballas, 0x80008096);
   GangZoneShowForPlayer(playerid, Vagos, 0xFFFF0096);
   GangZoneShowForPlayer(playerid, Vagos, 0xFFFF0096);
   GangZoneShowForPlayer(playerid, cop, 0x0000FF96);
   GangZoneShowForPlayer(playerid, NANG, 0x80400096);
   GangZoneShowForPlayer(playerid, SFR, 0x80FFFF96);
   GangZoneShowForPlayer(playerid, TRIAD, 0x00000096);
   return 1;

new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new string[128];
if(GetPlayerScore(playerid) < 0)
{
    format(string,sizeof(string),"%s has a naabscore: %d points.",name,GetPlayerScore(playerid));
    SendClientMessageToAll(COLOR_GOLD,string);
}
SetPlayerArmour(playerid,100);
SetPlayerToTeamColor(playerid);
return 1;
}

forward SetPlayerToTeamColor(playerid);
public SetPlayerToTeamColor(playerid)
{
   if (gTeam[playerid] == TEAM_BALLAS) //|| GetPlayerTeam(playerid) == 1)
   {
       SetPlayerColor(playerid, COLOR_BALLAS);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_GROVE) //|| GetPlayerTeam(playerid) == 2)
   {
       SetPlayerColor(playerid, COLOR_GROVE);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_VAGOS) //|| GetPlayerTeam(playerid) == 3)
   {
       SetPlayerColor(playerid, COLOR_VAGOS);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_MOTOBIKERS) //|| GetPlayerTeam(playerid) == 4)
   {
       SetPlayerColor(playerid, COLOR_MOTOBIKERS);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_LOS_AZTECAS) //|| GetPlayerTeam(playerid) == 5)
   {
       SetPlayerColor(playerid, COLOR_LOS_AZTECAS);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_TRIAD) //|| GetPlayerTeam(playerid) == 
   {
       SetPlayerColor(playerid, TEAM_COLOR_TRIAD);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_COP) //|| GetPlayerTeam(playerid) == 6)
   {
       SetPlayerColor(playerid, COLOR_COP);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_NANG) //|| GetPlayerTeam(playerid) == 7)
   {
       SetPlayerColor(playerid, COLOR_NANG);
       SetPlayerInterior(playerid,0);
   }
   else if (gTeam[playerid] == TEAM_RIFA) //|| GetPlayerTeam(playerid) == 
   {
       SetPlayerColor(playerid, COLOR_RIFA);
       SetPlayerInterior(playerid,0);
   }
}

public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
ResetPlayerWeapons(playerid);
ResetPlayerMoney(playerid);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new tmp[256],cmd[256],idx;
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayerid;
cmd = strtok(cmdtext, idx);
if(!strcmp(cmdtext,"/help",true))
{
    SendClientMessage(playerid,COLOR_GREEN,"     ` Team Deathmatch Commands `");
    SendClientMessage(playerid,COLOR_WHITE," ");
    SendClientMessage(playerid,COLOR_WHITE,"/kill /myscore /team ");
    SendClientMessage(playerid,COLOR_RED,"/ad /setscore /kick - RCON ONLY");
    return 1;
}
   if (!strcmp("/kill", cmdtext, true))
   {
       new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid,playername,sizeof(playername));
 	format(string,sizeof(string),".: %s Has Killed Him Self (/kill) :.",playername);
 	SendClientMessageToAll(COLOR_RED,string);

	SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
       SetPlayerHealth(playerid,0);
       return 1;
   }
   if (!strcmp(cmdtext,"/myscore",true))
   {
       new s = GetPlayerScore(playerid);
       format(string,sizeof(string),"Your score is %d.",s);
	SendClientMessage(playerid,COLOR_GOLD,string);
	return 1;
}
if(!strcmp(cmdtext,"/team",true) || !strcmp(cmdtext,"/myteam",true))
{
    new team[20];
    if(gTeam[playerid] == 1)
    {
        team = "Ballas";
    }
    else if(gTeam[playerid] == 2)
    {
        team = "Grove";
    }
    else if(gTeam[playerid] == 3)
    {
        team = "Vagos";
    }
    else if(gTeam[playerid] == 4)
    {
        team = "MOTOBIKERS";
    }
    else if(gTeam[playerid] == 5)
    {
        team = "Los Aztecas";
    }
    else return SendClientMessage(playerid,COLOR_GOLD,"ERROR: You don't have a team.");
    format(string,sizeof(string),"You are in %s Team.",team);
    if(gTeam[playerid] == 1) SendClientMessage(playerid,COLOR_BALLAS,string);
    else if(gTeam[playerid] == 2) SendClientMessage(playerid,COLOR_GROVE,string);
    else if(gTeam[playerid] == 3) SendClientMessage(playerid,COLOR_VAGOS,string);
    else if(gTeam[playerid] == 4) SendClientMessage(playerid,COLOR_MOTOBIKERS,string);
    else if(gTeam[playerid] == 5) SendClientMessage(playerid,COLOR_LOS_AZTECAS,string);
    else SendClientMessage(playerid,COLOR_WHITE,string);
	return 1;
}

if(!strcmp(cmd, "/setscore", true))
{
    if(IsPlayerConnected(playerid))
    {
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setscore [playerid/PartOfName] [sCORE]");
			return 1;
		}
		new playa,score;
		playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); score = strval(tmp);
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_WHITE,"Not an Rcon ADMIN.");
	    if(IsPlayerConnected(playa))
	    {
	        if(playa != INVALID_PLAYER_ID)
	        {
				GetPlayerName(playa, giveplayer, sizeof(giveplayer));
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "* You sets %s score to %d !",giveplayer,score);
				SendClientMessage(playerid, COLOR_GOLD, string);
				format(string, sizeof(string), "* %s sets your score to %d !", sendername, score);
				SendClientMessage(playa, COLOR_GOLD, string);
				SetPlayerScore(playa,score);
			}
		}
		else return SendClientMessage(playerid,COLOR_WHITE,"That player isn't connected.");
	}
	return 1;
}

if(!strcmp(cmd, "/kick", true))
{
    if(IsPlayerConnected(playerid))
    {
    	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid/PartOfName] [reason]");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		if (IsPlayerAdmin(playerid))
		{
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
				    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' '))
					{
						idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
					{
						result[idx - offset] = cmdtext[idx];
						idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid/PartOfName] [reason]");
						return 1;
					}
					format(string, sizeof(string), "%s have kicked %s. Reason: %s", sendername,giveplayer, (result));
					SendClientMessageToAll(KICK_COLOR, string);
                       Kick(giveplayerid);
					return 1;
				}
			}
		}
	}
	return 1;
}

if(!strcmp(cmd, "/ban", true))
{
    if(IsPlayerConnected(playerid))
    {
    	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [playerid/PartOfName] [reason]");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		if (IsPlayerAdmin(playerid))
		{
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
				    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' '))
					{
						idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
					{
						result[idx - offset] = cmdtext[idx];
						idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ban [playerid/PartOfName] [reason]");
						return 1;
					}
					format(string, sizeof(string), "%s have banned %s. Reason: %s", sendername,giveplayer, (result));
					SendClientMessageToAll(KICK_COLOR, string);
                       Ban(giveplayerid);
					return 1;
				}
			}
		}
	}
	return 1;
}

if(!strcmp(cmdtext,"/ad",true))
{
    if(IsPlayerAdmin(playerid))
    {
	    SetTimer("AD",500,0);
	    return 1;
	}
	return 1;
}
   return 0;
}

forward Respawn();
public Respawn()
{
   for(new x; x < MAX_VEHICLES; x++)
{
	SetVehicleToRespawn(x);
}
}

forward AD();
public AD()
{
new r = random(4) + 1;
if(r == 1)
   SendClientMessageToAll(COLOR_GOLD,"GangWar | Version 1.0 | Second");
   else if(r == 2)
   SendClientMessageToAll(COLOR_LEMON,"GangWar ® | Team Fights");
   else if(r == 3)
   SendClientMessageToAll(COLOR_ORANGE,"San Andreas Multiplayer - TDM");
   else if(r == 4)
   SendClientMessageToAll(COLOR_WHITEYELLOW,"Team Deathmatch © | Gangs War");
}

stock strtok(const string5[], &index)
{
new length = strlen(string5);
while ((index < length) && (string5[index] <= ' '))
{
	index++;
}

new offset = index;
new result[20];
while ((index < length) && (string5[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
	result[index - offset] = string5[index];
	index++;
}
result[index - offset] = EOS;
return result;
}


http://pastebin.com/mfb4b250

Geplaatst:

Had ik eerst ook,

Oranje is volgensmij de standaard kleur,

Als je ze in een team zet,

met dat::

SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2176.9158,-1676.7103,14.6513);	
SetPlayerFacingAngle(playerid, 76.9820);
SetPlayerCameraPos(playerid, 2171.0,-1677.0,15.0);
SetPlayerCameraLookAt(playerid, 2171.0,-1677.0,15.0);
gTeam[playerid] = TEAM_BALLAS;
SetPlayerTeam(playerid,1);

dan moet je dit toevoegen,

SetPlayerColor(playerid, 0xDDDD00FF);

0xDDDD00FF = de kleur maar je team kleuren werken ook bijv, COLOR_YELLOW

SetPlayerColor(playerid, COLOR_YELLOW);

dus als je dat gwoon bij die hele lijst neerset dat komt het goed

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

×   Je hebt text geplaatst met opmaak.   Opmaak verwijderen

  Only 75 emoji are allowed.

×   Je link is automatisch ingevoegd.   In plaats daarvan weergeven als link

×   Je vorige bewerkingen zijn hersteld.   Alles verwijderen

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent actief   0 leden

    • Er zijn hier geen geregistreerde gebruikers aanwezig.
×
×
  • Create New...