Witam. Poszukuję plugin Mianowicie:
Pluginu który po x rundach zamienia graczy drużynami + wynik.
Przykład gramy 12 rund jest 8:4 dla tt zmiana drużyn + zmiana wyniku jest 4:8 dla ct. Gramy 12 rund zmiana mapy, ewentualnie 3x restart + ciekawy cfg typu
http://wklej.org/id/774074/
Wiem że do tego pluginu jest potrzebne
#include <orpheu> #include <orpheu_memory>
Znalazłem coś takiego, ale jest tu trochę błędów nie mam pojęcia jak to naprawić bo słabo ogarniam orpheu
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <orpheu>
#include <orpheu_memory>
#include <ColorChat>
#define set_mp_pdata(%1,%2) ( OrpheuMemorySetAtAddress( g_pGameRules, %1, 1, %2 ) )
#define get_mp_pdata(%1) ( OrpheuMemoryGetAtAddress( g_pGameRules, %1 ) )
new g_pGameRules;
new pCvarResult;
new lic = 0;
new ttscore = 0;
new ctscore = 0;
public plugin_precache()
{
OrpheuRegisterHook( OrpheuGetFunction( "InstallGameRules" ), "OnInstallGameRules", OrpheuHookPost );
}
public OnInstallGameRules()
{
g_pGameRules = OrpheuGetReturn();
}
public plugin_init() {
register_plugin("mr12", "1.0", "M@lpa")
register_event("TeamScore", "teamScore", "a")
pCvarResult = register_cvar("change_team_result","12");
}
public teamScore(){
new sTeam[2];
read_data(1, sTeam, 1);
if( sTeam[0] == 'T' )
ttscore = read_data(2);
else
ctscore = read_data(2);
if(ttscore+ctscore >= get_pcvar_num(pCvarResult) && lic == 0) changeTeams();
else if(ttscore>ctscore)
{
set_hudmessage(255, 0, 0, -1.0, 0.40, 0, 6.0, 6.0, 4)
show_hudmessage(0, "TT wygrywa %i punktami", ttscore-ctscore)
}
else if(ctscore>ttscore)
{
set_hudmessage(0, 0, 255, -1.0, 0.40, 0, 6.0, 6.0, 4)
show_hudmessage(0, "CT wygrywa %i punktami", ctscore-ttscore)
}
else
{
if(ttscore+ctscore==0)
return PLUGIN_HANDLED;
set_hudmessage(0, 255, 0, -1.0, 0.40, 0, 6.0, 6.0, 4)
show_hudmessage(0, "Remis")
}
return PLUGIN_HANDLED;
}
public changeTeams(){
set_mp_pdata( "m_iNumCTWins", ttscore );
set_mp_pdata( "m_iNumTerroristWins", ctscore );
for(new i = 1 ; i <= get_maxplayers(); i++ )
{
if(!is_user_connected(i) || cs_get_user_team(i) == CS_TEAM_SPECTATOR || cs_get_user_team(i) == CS_TEAM_UNASSIGNED ) continue;
cs_set_user_team (i, cs_get_user_team(i) == CS_TEAM_CT?CS_TEAM_T:CS_TEAM_CT, CS_DONTCHANGE)
}
lic++;
ColorChat(0, RED, "--------------!!!ZMIANA DRUZYN!!!--------------");
UpdateTeamScores( .notifyAllPlugins = true );
return PLUGIN_HANDLED;
}
UpdateTeamScores ( const bool:notifyAllPlugins = false )
{
static OrpheuFunction:handleFuncUpdateTeamScores;
if ( !handleFuncUpdateTeamScores )
{
handleFuncUpdateTeamScores = OrpheuGetFunction( "UpdateTeamScores", "CHalfLifeMultiplay" )
}
( notifyAllPlugins ) ?
OrpheuCallSuper( handleFuncUpdateTeamScores, g_pGameRules ) :
OrpheuCall( handleFuncUpdateTeamScores, g_pGameRules );
}
http://wklej.to/LYofI
Męczę się z tym pluginem już tydzień i zawsze coś nie wychodzi: to graczy mi przerzuca wynik nie znowu wynik zamienia graczy nie przerzuca nie kiedy połowę teamu mi przerzuci a połowa zostaje + wynik. Pomóźcie


Dodatki SourceMod












