Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <core>
- #include <utils>
- #include <float>
- #include <time>
- //--------boje-----//
- #define bela 0xFFFFFFC8
- #define groveboja 0x008000FF
- #define ballasboja 0xFF0000FF
- static pTim[MAX_PLAYERS];
- forward SetPlayerToTeamColor(playerid);
- forward SetupPlayerForClassSelection(playerid);
- forward SetPlayerToTeamFromClass(playerid, classid);
- //===================================================/
- //===================================================/
- //===================================================/
- public OnGameModInit() { //Kada palimo server
- print(" ") ;
- print("============================================") ;
- print("Knock Out DeathMetch") ;
- print("============================================") ;
- print(" ");
- //vozila sa groove------------------------------------------//
- AddStaticVehicleEx(545,2505.60009766,-1688.00000000,13.50000000,0.00000000,-1,-86,86);
- AddStaticVehicleEx(492,2482.30004883,-1690.90002441,13.39999962,0.00000000,-1,-86,86);
- AddStaticVehicleEx(492,2474.39990234,-1689.50000000,13.39999962,0.00000000,-1,-86,86);
- //--------------------------ballas-------------------------------------------------//
- AddStaticVehicleEx(566,2502.80004883,-1551.09997559,23.29999924,0.00000000,-1,149,149);
- AddStaticVehicleEx(566,2506.80004883,-1551.50000000,23.20000076,0.00000000,-1,149,149);
- AddStaticVehicleEx(507,2510.30004883,-1551.40002441,23.20000076,0.00000000,-1,149,149);
- //---------------------------classovi----------------------------------------//
- AddPlayerClass(106,2495.4683,-1687.4482,13.5161,1.0023,22,100,0,0,0,0);
- AddPlayerClass(107,2486.7502,-1646.8213,14.0703,181.3389,22,100,0,0,0,0);
- AddPlayerClass(102,2000.0907,-1115.2217,27.1318,182.4643,22,100,0,0,0,0);
- return 1;
- }
- //===================================================/
- //===================================================/
- //===================================================/
- public OnGameModExit() { //Kada gasimo server
- print(" ") ;
- print("============================================") ;
- print("Gasenje Knock Out DeathMetch") ;
- print("============================================") ;
- print(" ");
- return 1;
- }
- //===================================================/
- //===================================================/
- //===================================================/
- public OnPlayerCommandText(playerid, cmdtext[]) {
- //===================================================/
- if(strcmp(cmdtext,"/kill",true)==0) {
- new Float:posx, Float:posy, Float:posz; GetPlayerPos(playerid, posx, posy, posz);
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, bela, "Pocionio si samoubistvo !");
- PlayerPlaySound(playerid, 1149, posx, posy, posz);
- return 1;
- }
- //--------------
- return 1;
- }
- //===================================================================
- stock pName(playerid) {
- new aName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, aName, sizeof(aName));
- return aName;
- }
- //===================================================/
- //===================================================/
- //===================================================/
- public OnPlayerSpawn(playerid)
- {
- SetPlayerToTeamColor(playerid);
- return 1;
- }
- //===================================================/
- //===================================================/
- //===================================================/
- public OnPlayerText(playerid, text[])
- {
- new string[256];
- //-----------Slanje Poruke svim igracima-----------------------//
- format(string,sizeof(string),"%s: %s", pName(playerid), text); SendClientMessageToAll(bela, string);
- return 0;
- }
- //===================================================/
- //===================================================/
- //===================================================/
- public OnPlayerRequestSpawn(playerid);
- {
- return 1;
- }
- //===================================================/
- //===================================================/
- //===================================================/
- public OnPlayerRequestClass (playerid, classid) {
- SetupPlayerForClassSelection(playerid);
- SetPlayerToTeamFromClass(playerid, classid);
- if(classid == 0 || classid == 1) {
- GameTextForPlayer(playerid, "~g~Grove ~w~Tim", 2000, 6);
- }else if(classid == 2 || classid == 3) {
- GameTextForPlayer(playerid, "~r~Ballas ~w~Tim", 2000, 6);
- return 1;
- }
- //==========================================//
- public SetPlayerToTeamColor(playerid) {
- if(pTim[playerid] == 1) {
- SetPlayerColor(playerid, groveboja);
- if(pTim[playerid] == 2) {
- SetPlayerColor(playerid, ballasboja); }
- return 1;
- }
- //==========================================//
- public SetPlayerToTeamColor(playerid, classid) {
- if(classid == 0 || classid == 1) {
- pTim[playerid] = 1;
- }else if(classid == 2 || classid == 3) {
- pTim[playerid] = 2; }
- return 1;
- }
- //-====================================-//
- public SetupPlayerForClassSelection(playerid);
- SetPlayerPos(playerid,1602.8048,-995.9656,24.0781);
- SetPlayerCameraPos(playerid,1603.2174,-995.8314,24.0781);
- SetPlayerCameraLookAt(playerid,1602.8048,-995.9656,24.0781);
- SetPlayerFacingAngle(playerid,174.2892);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment