Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ===================================
- | RPG with gTeam, Tankscript ect. |
- | Created by Kitarou |
- | This is the first GM by Kitarou |
- | all right reserved |
- | Copyright by Kitarou Have Fun! |
- ===================================
- */
- #include <a_samp>
- forward RestarterWarn();
- forward Restarter();
- new torname;
- forward tanken(playerid); new benzin[MAX_VEHICLES];
- forward payd(); new zahler=0;
- new Text:FORUM;
- static gTeam[MAX_PLAYERS];
- new Text:RPG;
- #define TEAM_GROVEA 0
- #define TEAM_GROVEB 1
- #define TEAM_GROVEC 2
- #define TEAM_BALLASA 3
- #define TEAM_BALLASB 4
- #define TEAM_BALLASC 5
- #define TEAM_COPA 6
- #define TEAM_COPB 7
- #define TEAM_MEDIC 8
- #define TEAM_TAXI 9
- #define TEAM_MECHANIC 10
- #define TEAM_HITMAN 11
- #define ORANGE 0xFF9933FF
- #define ROT 0xFF0000FF
- #define BLAU 0x0000FFFF
- #define GELBGR�N 0x99FF00FF
- #define GR�N 0x00FF00FF
- #define T�RKIS 0x00FFFFFF
- #define LILA 0xFF00FFFF
- #define WEISS 0xFFFFFFFF
- #define GELB 0xFFFF00FF
- #if defined R9G
- public OnFilterScriptInit()
- {
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n* * * * * * * * * * * *");
- print("* :::::::::::::::::::::::::::::::::: *");
- print("* ::::::R9G:COPYRIGHT:BY:KITAROU:::: *");
- print("* :::::::::::::::::::::::::::::::::: *");
- print("* * * * * * * * * * * * *");
- }
- #endif
- public OnGameModeInit()
- {
- SetTimer("RestarterWarn",550000,1);
- SetTimer("Restarter",600000,1);
- //OBJECTE
- CreateObject(1216, 2496.800537, -1687.815918, 13.212917, 0.0000, 0.0000, 180.0000);
- CreateObject(1283, 2465.284912, -1662.608643, 15.376801, 0.0000, 0.0000, 270.0000);
- CreateObject(1319, 2480.522949, -1688.974609, 13.063578, 0.0000, 0.0000, 0.0000);
- CreateObject(1319, 2481.634521, -1689.059570, 13.063662, 0.0000, 0.0000, 0.0000);
- CreateObject(1319, 2483.039795, -1689.146362, 13.060593, 0.0000, 0.0000, 0.0000);
- CreateObject(1319, 2484.335205, -1689.159180, 13.060612, 0.0000, 0.0000, 0.0000);
- CreateObject(1478, 2493.975342, -1687.594238, 13.150857, 0.0000, 0.0000, 180.0000);
- CreateObject(910, 2483.357422, -1690.230957, 13.784462, 0.0000, 0.0000, 180.0000);
- CreateObject(854, 2481.759521, -1690.600342, 12.725033, 0.0000, 0.0000, 0.0000);
- CreateObject(970, 1550.071167, -1720.166504, 13.106043, 0.0000, 0.0000, 270.0000);
- CreateObject(970, 1545.680542, -1720.283447, 13.106043, 0.0000, 0.0000, 270.0000);
- CreateObject(9833, 1541.238037, -1662.406860, 15.754702, 0.0000, 0.0000, 0.0000);
- CreateObject(11417, 1537.134033, -1724.385620, 17.420723, 0.0000, 0.0000, 0.0000);
- CreateObject(3399, 1571.814453, -1634.193604, 14.700149, 0.0000, 0.0000, 0.0000);
- CreateObject(8613, 1579.649170, -1646.101318, 22.975592, 0.0000, 0.0000, 180.0000);
- CreateObject(970, 1541.486084, -1720.176514, 13.106043, 0.0000, 0.0000, 270.0000);
- CreateObject(970, 1547.751221, -1718.030273, 13.098356, 0.0000, 0.0000, 0.2408);
- CreateObject(970, 1543.567627, -1718.084229, 13.106043, 0.0000, 359.1406, 180.8595);
- CreateObject(1686, 1545.450928, -1720.270264, 12.567865, 0.0000, 0.0000, 0.0000);
- CreateObject(1686, 1549.827759, -1720.041260, 12.567865, 0.0000, 0.0000, 0.0000);
- //ENDE
- for(new v=0; v<MAX_VEHICLES; v++) {
- benzin[v]=100; }
- SetTimer("payd",50000,1);
- //DER GR�NE FORUM TEXT UNTEN
- FORUM = TextDrawCreate(41.000000,433.000000,"www.r9g.de.vu visit us now");
- TextDrawAlignment(FORUM,0);
- TextDrawFont(FORUM,3);
- TextDrawLetterSize(FORUM,1.000000,1.000000);
- TextDrawColor(FORUM,0x00ff0099);
- TextDrawSetProportional(FORUM,1);
- TextDrawSetShadow(FORUM,3);
- //DAS "RPG" �BER DER LEBENLEISTE
- RPG = TextDrawCreate(575.000000,33.000000,"RPG");
- TextDrawAlignment(RPG,2);
- TextDrawBackgroundColor(RPG,0x000000ff);
- TextDrawFont(RPG,0);
- TextDrawLetterSize(RPG,0.899999,2.799999);
- TextDrawColor(RPG,0xffffffff);
- TextDrawSetProportional(RPG,1);
- TextDrawSetShadow(RPG,3);
- UsePlayerPedAnims();
- SetGameModeText("R9G by Kitarou");
- AddPlayerClass(105,2495.1980,-1686.2029,13.5135,4.6309,4,1,24,500,0,0); // GROVE SPAWN 01
- AddPlayerClass(106,2495.1980,-1686.2029,13.5135,4.6309,4,1,24,500,0,0); // GROVE SPAWN 02
- AddPlayerClass(107,2495.1980,-1686.2029,13.5135,4.6309,4,1,24,500,0,0); // GROVE SPAWN 03
- AddPlayerClass(102,2141.4170,-1207.8395,23.9262,320.9318,4,1,24,500,0,0); // BALLAS SPAWN 01
- AddPlayerClass(103,2141.4170,-1207.8395,23.9262,320.9318,4,1,24,500,0,0); // BALLAS SPAWN 02
- AddPlayerClass(104,2141.4170,-1207.8395,23.9262,320.9318,4,1,24,500,0,0); // BALLAS SPAWN 03
- AddPlayerClass(11,1543.3296,-1675.7927,13.5562,89.9875,3,1,24,500,41,1000); // POLICE GIRL SPAWN
- AddPlayerClass(280,1545.4293,-1676.0604,13.5603,90.1551,3,1,24,500,41,1000); // POLICE SPAWN
- AddPlayerClass(274,2034.7188,-1412.8475,16.9922,138.8875,4,1,0,0,0,0); // MEDIC SPAWN
- AddPlayerClass(48,1481.6393,-1749.4650,15.4453,359.1471,4,1,0,0,0,0); // TAXI SPAWN
- AddPlayerClass(50,1938.0367,-1790.2450,13.3828,30.6836,4,1,0,0,0,0); // MECHANIC SPAWN
- AddPlayerClass(294,979.5117,-675.9416,121.9763,27.7096,4,1,34,100,0,0); // HITMAN SPAWN
- //TAXI CARS
- AddStaticVehicle(420,1475.0139,-1737.8157,13.2403,268.8030,6,1); // TAXI CAR 01
- AddStaticVehicle(420,1487.3387,-1737.9551,13.2406,269.5039,6,1); // TAXI CAR 02
- AddStaticVehicle(420,1499.1409,-1738.0006,13.2403,269.5333,6,1); // TAXI CAR 03
- //COP CARS/HELIS
- AddStaticVehicle(497,1556.0691,-1653.4341,28.5723,177.7945,0,1); // COP HELI 01
- AddStaticVehicle(497,1548.9847,-1642.3854,28.5789,88.7903,0,1); // COP HELI 02
- AddStaticVehicle(596,1535.8673,-1666.8728,13.1036,180.0335,0,1); // COP CAR 01
- AddStaticVehicle(596,1535.8719,-1673.4003,13.1031,180.0332,0,1); // COP CAR 02
- AddStaticVehicle(596,1535.9105,-1679.8615,13.1123,181.6181,0,1); // COP CAR 03
- AddStaticVehicle(596,1585.1265,-1667.4609,5.6127,89.7703,0,1); // COP CAR 04
- AddStaticVehicle(596,1584.9727,-1671.6616,5.6137,90.1540,0,1); // COP CAR 05
- AddStaticVehicle(596,1601.4404,-1683.8806,5.6119,269.7783,0,1); // COP CAR 06
- //MEDIC CARS
- AddStaticVehicle(416,2000.1616,-1403.1171,17.8102,179.9288,1,3); // MEDIC CAR 01
- AddStaticVehicle(416,1999.9353,-1432.5380,14.9936,178.8975,1,3); // MEDIC CAR 02
- AddStaticVehicle(416,2016.3073,-1446.6194,15.1280,89.9163,1,3); // MEDIC CAR 03
- AddStaticVehicle(416,2033.4210,-1432.7378,17.2968,178.9142,1,3); // MEDIC CAR 04
- //GROVE CARS/BIKES
- AddStaticVehicle(451,2505.4768,-1694.4153,13.2639,181.2707,16,16); // GROVE CAR 01
- AddStaticVehicle(451,2517.1831,-1666.8346,13.7452,82.8883,16,16); // GROVE CAR 02
- AddStaticVehicle(461,2509.2041,-1671.8207,12.9441,346.6973,37,1); // GROVE BIKE 01
- AddStaticVehicle(461,2498.3499,-1683.0516,12.9498,104.8844,37,1); // GROVE BIKE 02
- //BALLAS CARS/BIKES
- AddStaticVehicle(402,2148.4192,-1194.4762,23.6649,269.6021,30,30); // BALLAS CAR 01
- AddStaticVehicle(402,2162.0518,-1187.6877,23.6508,88.0318,30,30); // BALLAS CAR 02
- AddStaticVehicle(402,2148.4531,-1189.4019,23.6516,89.3378,30,30); // BALLAS CAR 03
- AddStaticVehicle(402,2160.8772,-1192.2325,23.6518,89.7005,30,30); // BALLAS CAR 04
- AddStaticVehicle(461,2154.4482,-1209.8069,23.4542,270.2165,75,1); // BALLAS BIKE 01
- AddStaticVehicle(461,2152.3284,-1209.8134,23.4714,270.0692,75,1); // BALLAS BIKE 02
- //MECHANIC CARS
- AddStaticVehicle(525,1932.8370,-1769.7675,13.2562,0.5496,36,43); // MECHANIC CAR 01
- AddStaticVehicle(525,1932.9170,-1778.1058,13.2609,0.5488,36,43); // MECHANIC CAR 02
- AddStaticVehicle(525,1932.9861,-1785.3280,13.2745,0.5474,36,43); // MECHANIC CAR 03
- AddStaticVehicle(525,1924.9741,-1788.5638,13.2648,268.9179,36,43); // MECHANIC CAR 04
- //Z�GE
- AddStaticVehicle(449,1691.6464,-1953.6283,13.9973,270.0375,1,74); // ZUG 01
- AddStaticVehicle(449,1691.2041,-1957.8750,13.9973,270.0000,1,74); // ZUG 02
- AddStaticVehicle(449,1699.7175,-1957.8750,13.9973,270.0008,1,74); // ZUG 03
- AddStaticVehicle(449,1700.3882,-1953.6431,13.9973,269.7768,1,74); // ZUG 04
- //HITMAN CARS
- AddStaticVehicle(402,959.0936,-674.5337,120.9791,117.9752,39,39); // HITMAN CAR 01
- AddStaticVehicle(402,965.0483,-671.3702,120.9791,117.9805,39,39); // HITMAN CAR 02
- AddStaticVehicle(402,970.5135,-668.4645,120.9800,118.0047,39,39); // HITMAN CAR 03
- AddStaticVehicle(402,975.8194,-665.6428,120.9801,118.0047,39,39); // HITMAN CAR 04
- AddStaticVehicle(568,989.0847,-670.6770,121.8421,90.5440,9,39); // HITMAN CAR BURITO 01
- AddStaticVehicle(568,967.3258,-683.5363,121.8432,302.4795,9,39); // HITMAN CAR BURITO 02
- AddStaticVehicle(606,1007.7741,-648.1203,121.2676,189.3195,0,0); // HITMAN CAR TARNUNG 01
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- if(classid == 0)
- {
- SetPlayerColor(playerid,GR�N);
- GameTextForPlayer(playerid,"Grove",600,6);
- gTeam[playerid] = TEAM_GROVEA;
- }
- if(classid == 1)
- {
- SetPlayerColor(playerid,GR�N);
- GameTextForPlayer(playerid,"Grove",600,6);
- gTeam[playerid] = TEAM_GROVEB;
- }
- if(classid == 2)
- {
- SetPlayerColor(playerid,GR�N);
- GameTextForPlayer(playerid,"Grove",600,6);
- gTeam[playerid] = TEAM_GROVEC;
- }
- if(classid == 3)
- {
- SetPlayerColor(playerid,LILA);
- GameTextForPlayer(playerid,"Ballas",600,6);
- gTeam[playerid] = TEAM_BALLASA;
- }
- if(classid == 4)
- {
- SetPlayerColor(playerid,LILA);
- GameTextForPlayer(playerid,"Ballas",600,6);
- gTeam[playerid] = TEAM_BALLASB;
- }
- if(classid == 5)
- {
- SetPlayerColor(playerid,LILA);
- GameTextForPlayer(playerid,"Ballas",600,6);
- gTeam[playerid] = TEAM_BALLASC;
- }
- if(classid == 6)
- {
- SetPlayerColor(playerid,BLAU);
- GameTextForPlayer(playerid,"Police",600,6);
- gTeam[playerid] = TEAM_COPA;
- }
- if(classid == 7)
- {
- SetPlayerColor(playerid,BLAU);
- GameTextForPlayer(playerid,"Police",600,6);
- gTeam[playerid] = TEAM_COPB;
- }
- if(classid == 8)
- {
- SetPlayerColor(playerid,ROT);
- GameTextForPlayer(playerid,"medic",600,6);
- gTeam[playerid] = TEAM_MEDIC;
- }
- if(classid == 9)
- {
- SetPlayerColor(playerid,GELB);
- GameTextForPlayer(playerid,"taxi",600,6);
- gTeam[playerid] = TEAM_TAXI;
- }
- if(classid == 10)
- {
- SetPlayerColor(playerid,T�RKIS);
- GameTextForPlayer(playerid,"mechanic",600,6);
- gTeam[playerid] = TEAM_MECHANIC;
- }
- if(classid == 11)
- {
- SetPlayerColor(playerid,GELBGR�N);
- GameTextForPlayer(playerid,"Hitman",600,6);
- gTeam[playerid] = TEAM_HITMAN;
- }
- SetPlayerPos(playerid, 2494.2866,-1692.0078,23.6453);
- SetPlayerCameraPos(playerid, 2494.2627,-1703.2295,23.6841);
- SetPlayerCameraLookAt(playerid, 2494.2866,-1692.0078,23.6453);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SetPlayerMapIcon( playerid, 22, 2014.3801,-1433.8304,13.5547, 52, 0 ); //HOSPITAL
- SetPlayerMapIcon( playerid, 30, 1543.5328,-1675.8600,13.5566, 52, 0 ); //PD
- SetPlayerMapIcon( playerid, 23, 979.1563,-675.9426,121.9763, 52, 0 ); //HITMAN
- SetPlayerMapIcon( playerid, 55, 1481.2837,-1749.4658,15.4453, 52, 0 ); //TAXI
- torname=CreateObject(969, 1591.864380, -1637.682129, 12.621239, 0.0000, 0.0000, 180.0000);//die Positionen vom GESCHLOSSENEN Tor
- TextDrawShowForPlayer(playerid,RPG);
- TextDrawShowForPlayer(playerid,FORUM);
- new pname[MAX_PLAYER_NAME];
- new string[100];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "%s join the Server!", pname);
- SendClientMessageToAll(0xAAAAAAAA, string);
- SendClientMessage(playerid,WEISS,"welcome to Kitarou's R9G!");
- SendClientMessage(playerid,WEISS,"you need help? no problem, type /help!");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new pname[MAX_PLAYER_NAME];
- new string[100];
- GetPlayerName(playerid, pname, sizeof(pname));
- switch(reason)
- {
- case 0: format(string, sizeof(string), "%s has leave the server. (timeout)", pname);
- case 1: format(string, sizeof(string), "%s has leave the server.", pname);
- case 2: format(string, sizeof(string), "%s has leave the server. (Kick/ban)", pname);
- }
- SendClientMessageToAll(0xAAAAAAAA, string);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerPrivmsg(playerid, recieverid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/help", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,WEISS,"HELP:/policehelp /medichelp /taxihelp /grovehelp /ballashelp /mechanichelp /hitmanhelp");
- SendClientMessage(playerid,WEISS,"CMDS: /kill /rules /Changes (/changes = the new scriptupdates)");
- return 1;
- }
- if (strcmp("/changes", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,ORANGE,"=============UPDATES=============");
- SendClientMessage(playerid,ORANGE,"UPDATES:a PayDay is now in the Game!");
- SendClientMessage(playerid,ORANGE,"UPDATES:a Gas Station and a GasOmeter");
- SendClientMessage(playerid,ORANGE,"UPDATES:is now in use!");
- SendClientMessage(playerid,ORANGE,"UPDATES:new map, and Gates for the cops,");
- SendClientMessage(playerid,ORANGE,"UPDATES:pls read /policehelp!");
- SendClientMessage(playerid,ORANGE,"UPDATES:PayDay is giving now 1000$");
- SendClientMessage(playerid,ORANGE,"UPDATES:an automatic GMX is starting");
- SendClientMessage(playerid,ORANGE,"UPDATES:ever in one hour!");
- SendClientMessage(playerid,ORANGE,"IDEAS: for ideas send a email at");
- SendClientMessage(playerid,ORANGE,"IDEAS: [email protected] !");
- SendClientMessage(playerid,ORANGE,"=============UPDATES=============");
- return 1;
- }
- if(strcmp(cmdtext,"/exit",true)==0) {
- if(GetPlayerState(playerid)==2) {
- TogglePlayerControllable(playerid,1);
- RemovePlayerFromVehicle(playerid); }
- return 1;
- }
- if (strcmp("/policehelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,BLAU,"as a COP (POLICE) you must defend all civils for GANGS and HITMEN");
- SendClientMessage(playerid,BLAU,"as a COP (POLICE) you can open/close the PD Gates.");
- SendClientMessage(playerid,BLAU,"as a FEMALE COP: /PDO1 and /PDC1, as a MALE COP: /PDO2 and /PDC2 !");
- return 1;
- }
- if (strcmp("/medichelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,ROT,"as a MEDIC you must drive with the medic car,");
- SendClientMessage(playerid,ROT,"and you have to heal people, but ONLY if they want it. you can people heal with /heal!");
- SendClientMessage(playerid,ROT,"but it does only when the person sitting in the car!");
- return 1;
- }
- if (strcmp("/taxihelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,GELB,"as a TAXI driver you must drive peoples");
- return 1;
- }
- if (strcmp("/grovehelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,GR�N,"as a GROVE you must kill the BALLAS");
- return 1;
- }
- if (strcmp("/kill", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid,0.0);
- SendClientMessage(playerid,ROT,"You kill yourself!");
- return 1;
- }
- if (strcmp("/ballashelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,LILA,"as a BALLAS you must kill the GROVE's");
- return 1;
- }
- if(strcmp(cmdtext,"/pdo1",true)==0) {
- if(gTeam[playerid] == TEAM_COPA)
- MoveObject(torname,1584.218872, -1637.757690, 12.549690,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
- else
- SendClientMessage(playerid,ROT,"you aren't a cop!");
- return 1;
- }
- if(strcmp(cmdtext,"/pdo2",true)==0) {
- if(gTeam[playerid] == TEAM_COPB)
- MoveObject(torname,1584.218872, -1637.757690, 12.549690,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
- else
- SendClientMessage(playerid,ROT,"you aren't a cop!");
- return 1;
- }
- if(strcmp(cmdtext,"/pdc1",true)==0) {
- if(gTeam[playerid] == TEAM_COPA)
- MoveObject(torname,1591.864380, -1637.682129, 12.621239,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
- else
- SendClientMessage(playerid,ROT,"you aren't a cop!");
- return 1;
- }
- if(strcmp(cmdtext,"/pdc2",true)==0) {
- if(gTeam[playerid] == TEAM_COPB)
- MoveObject(torname,1591.864380, -1637.682129, 12.621239,5);//die x, y und zFloats vom OFFENEN Tor eintragen, bei Geschwindigkeit... trag da einfach ne Zahl zwischen 0.1 und 20 ein (je dichter die Zah lan 20 dran ist, desto schneller bewegt ich das Tor)
- else
- SendClientMessage(playerid,ROT,"you aren't a cop!");
- return 1;
- }
- if (strcmp("/mechanichelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,T�RKIS,"as a MECHANIC you must tow cars with the AKTION KEY (normal TAB)");
- return 1;
- }
- new cmd[256];
- new tmp[256];
- new idx;
- new sendername[256];
- new giveplayer[256];
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/heal", true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, 0xBFC0C2FF, "INFO: /heal [playerid]");
- return 1;
- }
- new playa = strval(tmp);
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new Get1,Get2;
- Get1 = GetPlayerVehicleID(playa);
- Get2 = GetPlayerVehicleID(playerid);
- if(!IsPlayerInAnyVehicle(playerid)) { return 1; }
- if(!IsPlayerInAnyVehicle(playa)) { return 1; }
- if(gTeam[playerid] == TEAM_MEDIC)
- {
- new formatX[256];
- if(Get1 == Get2)
- {
- SetPlayerHealth(playa,100);
- format(formatX,sizeof(formatX),"you has healed %s, %s",giveplayer,sendername);
- SendClientMessage(playerid,0xBFC0C2FF,formatX);
- SendClientMessage(playa,0xBFC0C2FF,formatX);
- format(formatX,sizeof(formatX)," %s healed you, %s",sendername,giveplayer);
- }
- else
- {
- }
- }
- return 1;
- }
- if(strcmp(cmdtext,"/refill",true)==0) {
- if(PlayerToPoint(10.0,playerid,1543.3259,-1720.5739,13.5546) || PlayerToPoint(10.0,playerid,1547.8899,-1720.5204,13.5546)) {
- if(GetPlayerState(playerid)==2) {
- new aid=GetPlayerVehicleID(playerid);
- if(GetPlayerMoney(playerid)>=100-benzin[aid]*150) {
- GameTextForPlayer(playerid,"your car is now refilled",5000,1);
- benzin[aid]=100; }
- else {
- new s[50], lit=GetPlayerMoney(playerid)/150;
- format(s,sizeof(s),"%d litres filled",lit);
- GameTextForPlayer(playerid,s,5000,1);
- benzin[aid]+=lit; }}}
- return 1;
- }
- if (strcmp("/rules", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,ROT,"-----------------------------------------------");
- SendClientMessage(playerid,WEISS,"RULES: DON'T kill anybody on the spawnpoint (!)");
- SendClientMessage(playerid,WEISS,"RULES: you CAN do drive-by, but MUSTN'T DM!");
- SendClientMessage(playerid,WEISS,"RULES: respect other player");
- SendClientMessage(playerid,WEISS,"RULES: DON'T: Spam, flame, speak in caps, verbs for other server's");
- SendClientMessage(playerid,ROT,"-----------------------------------------------");
- return 1;
- }
- if (strcmp("/hitmanhelp", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid,GELBGR�N,"as a HITMAN you must kill the civils (medic,police,taxi) but pls: NO DM!");
- return 1;
- }
- return 0;
- }
- public OnPlayerInfoChange(playerid)
- {
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate==2) {
- if(benzin[GetPlayerVehicleID(playerid)]==0) {
- RemovePlayerFromVehicle(playerid);
- TogglePlayerControllable(playerid,1); }}
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public payd() {
- for(new i=0; i<MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i)) {
- if(zahler>=5) {
- GivePlayerMoney(i,1000);
- zahler=0;
- SendClientMessage(i,GR�N,"---------PayDay---------");
- SendClientMessage(i,WEISS,"PayDay, you become 1000$");
- SendClientMessage(i,GR�N,"---------PayDay---------"); }
- tanken(i); }}
- zahler++; }
- public tanken(playerid) {
- if(GetPlayerState(playerid)==2) {
- new aid=GetPlayerVehicleID(playerid);
- if(benzin[aid]>=1) {
- new s[30];
- benzin[aid]--;
- format(s,sizeof(s),"Tank: %d/100 Liter",benzin[aid]);
- GameTextForPlayer(playerid,s,10000,1); }
- else {
- SendClientMessage(playerid,ROT,"Your tank is empty, use /exit to get off!");
- SendClientMessage(playerid,ROT,"you would have previously to the gas station, which is near the PD, type / refill there!");
- //jetzt m�sste man ihn entweder freezen, damit er nicht weiterf�hrt...
- //TogglePlayerControllable(playerid,0);
- }}}
- //--------------------------------------------[PlayerToPoint]------------------------------------------
- stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- public Restarter()
- {
- SendClientMessageToAll(ROT,"GMX has started now!");
- GameModeExit();
- }
- public RestarterWarn()
- {
- SendClientMessageToAll(ROT,"in 5 minutes is an GMX!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement