rezultato issaugojimas po sv_restart

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
nullatonce
O taip. Jis jau surinko 50 žinučių!
Posts: 73
Joined: 2016 Sep 06 23:57
Skype: nullatonce

rezultato issaugojimas po sv_restart

Post by nullatonce »

Sveiki geekai, Noriu issaugoti žaidimo rezultatą po sv_restart, bet kol kas niekaip man to nesigavo padaryt..

Šiuo metu žaidimo rezultatas saugomas

Code: Select all

enum _teams {    _terro,    _ct} new g_iScore[_teams]
Bandžiau ir kituose pluginuose žiūrėt, nieko nepamačiau kas padėtu. Gal kas turi įdėjų ?
Last edited by nullatonce on 2016 Nov 06 13:31, edited 1 time in total.

User avatar
beast
AMX Mod X ekspertai
Posts: 509
Joined: 2011 Jan 08 18:44
Skype: thefurious4
Contact:

Re: visų žaidėjų perkelimas į komandą

Post by beast »

id -> iPlayers

nullatonce
O taip. Jis jau surinko 50 žinučių!
Posts: 73
Joined: 2016 Sep 06 23:57
Skype: nullatonce

Re: rezultato issaugojimas po sv_restart

Post by nullatonce »

Dėkui. Redagavau pirma pranešimą, gal kas padės ir su šiuo dalyku ?

peaksas
Naujokas apylinkėse
Posts: 3
Joined: 2016 Nov 06 03:06

Re: rezultato issaugojimas po sv_restart

Post by peaksas »

Code: Select all

#include <amxmodx> #include <amxmisc>  #pragma semicolon 1  #define PLUGIN "TeamScore No Reset" #define VERSION "0.0.1"  new bool:g_bCompleteReset; new bool:g_bAdminReset;  new g_iScoresOffsets[2], g_iScores[2];  public plugin_init() {     register_plugin( PLUGIN, VERSION, "ConnorMcLeod" );      register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0");     register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w");      register_message(get_user_msgid("TeamScore"), "Message_TeamScore");      register_concmd("amx_reset_teamscore", "ConCmd_ResetScores", ADMIN_CFG); }  public ConCmd_ResetScores(id, lvl, cmd) {     if( cmd_access(id, lvl, cmd, 1) )     {         g_bAdminReset = true;         g_iScoresOffsets[0] = 0;         g_iScoresOffsets[1] = 0;         server_cmd("sv_restart 1");     } }  public Event_TextMsg_Restart() {     if( g_bAdminReset )     {         g_bAdminReset = false;         return     }      g_bCompleteReset = true; }  public Event_HLTV_New_Round() {     if( g_bCompleteReset )     {         g_iScoresOffsets[0] = g_iScores[0];         g_iScoresOffsets[1] = g_iScores[1];     } }  public Message_TeamScore(SVC_ID, MSG_DEST) {     new szTeam[2];     get_msg_arg_string(1, szTeam, charsmax(szTeam));     new iTeam = szTeam[0] == 'T';     if( MSG_DEST == MSG_ALL )     {         g_iScores[ iTeam ] = get_msg_arg_int(2);     }     if( g_iScoresOffsets[ iTeam ] )     {         set_msg_arg_int(2, ARG_SHORT, g_iScoresOffsets[ iTeam ] + g_iScores[ iTeam ]);     } }  
Rasta šitoje temoje. Gal kažką/kažkaip prisitaikysi, jeigu šitaip supratau tavo prašymą. :S:
Sėkmės.
Last edited by peaksas on 2016 Nov 06 23:33, edited 1 time in total.

nullatonce
O taip. Jis jau surinko 50 žinučių!
Posts: 73
Joined: 2016 Sep 06 23:57
Skype: nullatonce

Re: rezultato issaugojimas po sv_restart

Post by nullatonce »

Teisingai supratai, žiūrėjau, žiūrėjau į tavo pateikta kodą ir supratau, kad nieko nesuprantu. Pagilint dar žinias reikia, bet susiradau kažkokį sprendimą, nežinau ar pakankamai efektyvus, bet veikia.
Dėkui už sugaišta laiką, žinau, kad visi čia pamiše dėl to Image mygtuko, todėl prašom, ego patenkinimui :)

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests