Jump to content

Search the Community

Showing results for tags 'pawn'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Główna kategoria forum
    • Regulamin
    • FAQ
    • Przywitaj się/Pożegnaj się
    • Sprawy związane z siecią
    • Konkursy
  • Kącik Redaktorski
    • Gazetka
    • Wiadomości ze świata
    • Filmy Seriale Książki
    • Informacje
  • Bany
    • AntiCheat - Report cheat
    • Request UB
  • Serwery Counter Strike 1.6
    • Cs-Classic.pl [DeathRun]
  • Serwery Counter Strike Global Offensive
    • Cs-Classic.pl [CS:GO FFA]
    • Cs-Classic.pl [CS:GO Call Of Duty]
    • Cs-Classic.pl [CS:GO JailBreak]
    • Cs-Classic.pl [CS:GO NewDiabloMod]
    • Cs-Classic.pl [CS:GO Multi-Arena 1vs1]
  • Inne serwery
  • Forum Komputerowe
  • Hyde Park
  • Gry
  • Tematy Zamknięte

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Nick


Lokacja


Zainteresowania


Steam Custom URL


GG

 
or  

Snapchat


Instagram


Skype


Strona WWW

Found 2 results

  1. Hello, can anybody of you correct my code? If it tries to transfer both of us (best player on the server in certain team with the opposite random player in opposite team, it sometimes transfers both and sometimes doesn't. Please try correcting it and explaining how u corrected it. #include <amxmodx> #include <amxmisc> #include <cromchat> #include <cstrike> #include <fun> #define PLUGIN "Transfer Plugin" #define VERSION "1.0" #define AUTHOR "Reddington" new g_iEnemiesKilled[33]; new cvar_transferafter; new rounds; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_logevent("logevent_round_end", 2, "1=Round_End"); cvar_transferafter = register_cvar("r_transferafter", "5.0"); } public logevent_round_end() { rounds++; if(rounds > get_pcvar_num(cvar_transferafter)) { //Retrieve the IDs of best killers in the server. new ctID = GetTopKiller(2); new tID = GetTopKiller(1); //Retriev user frags new ctKills = get_user_frags(ctID); new tKills = get_user_frags(tID); //Retrieve user deaths. new ctDeaths = get_user_deaths(ctID); new tDeaths = get_user_deaths(tID); //Compare kill to deaths ratio. if((ctKills / ctDeaths) > (tKills / tDeaths)) { //CT is better //Get user's name. new name[255], name2[255] ,msg[255], iPnum, players[32], player1; get_user_name(ctID, name, sizeof(name)); if(is_user_alive(ctID)) { set_user_health(ctID, 0); } //Transfer the best player to opponent team. cs_set_user_team(ctID, CS_TEAM_T); get_players(players, iPnum, "ceh", "TERRORIST"); player1 = players[random(iPnum)]; //Get the name of the opposite random enemy. get_user_name(player1, name2, sizeof(name2)); if(is_user_alive(player1)) { set_user_health(player1, 0); } //Swap the random player from T to CT. cs_set_user_team(player1, CS_TEAM_CT); formatex(msg, sizeof(msg), "&x07[&x04LamdaProCS&x07] &x03Player &x04%s &x03has been replaced by player &x04%s", name, name2); for(new x = 1; x < 33; x++) { if(is_user_connected(x)) { CC_SendMessage(x, msg); } } ctKills = 0; ctDeaths = 0; tKills = 0; tDeaths = 0; rounds = 0; player1 = 0; } if((ctKills / ctDeaths) < (tKills / tDeaths)) //T is better { //Get user's name. new name[255], name2[255] ,msg[255], iPnum, players[32], player1; get_user_name(tID, name, sizeof(name)); if(is_user_alive(tID)) { set_user_health(tID, 0); } //Transfer the best player to opponent team. cs_set_user_team(tID, CS_TEAM_CT); get_players(players, iPnum, "ceh", "CT"); player1 = players[random(iPnum)]; //Get the name of the opposite random enemy. get_user_name(player1, name2, sizeof(name2)); if(is_user_alive(player1)) { set_user_health(player1, 0); } //Swap the random player from CT to T. cs_set_user_team(player1, CS_TEAM_T); formatex(msg, sizeof(msg), "&x07[&x04LamdaProCS&x07] &x03Player &x04%s &x03has been replaced by player &x04%s", name, name2); for(new x = 1; x < 33; x++) { if(is_user_connected(x)) { CC_SendMessage(x, msg); } } ctKills = 0; ctDeaths = 0; tKills = 0; tDeaths = 0; rounds = 0; player1 = 0; } if((ctKills / ctDeaths) == (tKills / tDeaths)) { } } } GetTopKiller(iTeam) { new iPlayers[32], iPlayersnum; get_players(iPlayers, iPlayersnum, "ceh", iTeam == 1 ? "TERRORIST" : "CT") SortCustom1D(iPlayers, iPlayersnum, "SortByKills") return iPlayers[0] } public SortByKills(elem1, elem2) { if ( g_iEnemiesKilled[elem1] > g_iEnemiesKilled[elem2] ) { return -1; } else { return 1; } return 0; }
  2. ColorChat to include, który pozwala nam na pisanie kolorowych komunikatów na czacie w csie. Instalacja ColorChat.inc Pierwsze co musisz zrobić to pobrać plik z załącznika. Następnie ColorChat.inc wypakowujesz do katalogu include/ w swoim kompilatorze (w przypadku gdy chcemy kompilować lokalnie) Jak zacząć pisać #include <amxmodx> #include <amxmisc> #include <colorchat> //w każdym pluginie z użyciem colorchat trzeba dodać taki include #define PLUGIN "nowy pl... //jakiś tam kod... } składnia ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...) Gdzie (id, //index gracza Color:type, //kolor którym zaczynamy wiadomość, dostepne kolory: /* YELLOW = 1, ==standardowy zółty GREEN, ==zielony TEAM_COLOR, ==kolor teamu(niebieski/czerwony/szary) GREY, ==szary RED, ==czerwony BLUE, ==niebieski*/ const msg[] //zawartość wiadomości {Float,Sql,Result,_} //inne zmienne Colorchat daje nam również możliwość zmiany koloru podczas pisania, dostępne kolory: ^x01 //normalny ^x04 // zielony ^x03 // teamu Jak tego użyć? public function(id){ //(powiedzmy że mamy id gracza) new szName[32]; //zrobiłem to tylko po co, żeby pokazać jak użyć zmiennej w ColorChat get_user_name(id, szName, 31); ColorChat(id, RED, "[Plugin Tag]^x04Twoj nick to %s", szName) Gotowy plugin #include <amxmodx> #include <amxmisc> #include <colorchat> public plugin_init() { register_plugin("colorchat", "1.0", "Destroyer") register_clcmd("say test", "function") } public function(id){ new szName[32]; get_user_name(id, szName, 31); ColorChat(id, RED, "[Plugin Tag]^x04Twoj nick to %s", szName) //[Plugin tag] będzie na czerwono, reszta zielona +wyświetli się nick ze zmiennej szName ColorChat(id, RED, "czerwony,^x04 zielony, ^x01zolty(domyslny),^x03 kolor teamu") //tutaj pokazałem jak użyć zmiany koloru i jaki kolor kiedy będzie } ^x01 - żółty kolor ^x03 - kolor teamu ^x04 - kolor zielony Na necie jest pełno o tym, poradnik jest mojego autorstwa Stary poradnik, ale zawsze się przyda komus kto jest zielony w tym. colorchat.rar
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Guidelines