What i need to incorporate this in a plugin and this only works if i type .live
Example in my server have a plugin if i type .warmup the server do sv_restart 1 and the money sets to 16000 and when i type .live hes configure for pcw and i need activate this when i type .live
#include <amxmodx>
#include <cstrike>
new gRound;
new sv_restart;
new gMaxPlayers;
public plugin_init() {
register_plugin("Clan War - Team Swap", "0.0.1", "Exolent");
register_logevent("EventRoundStart", 2, "1=Round_Start");
register_event("TextMsg", "EventRestartRound", "a", "2&#Game_w", "2&#Game_C");
sv_restart = get_cvar_pointer("sv_restart"); gMaxPlayers = get_maxplayers();
}
public EventRoundStart() {
if(++gRound == 15) {
for(new id = 1; id <= gMaxPlayers; id++) {
if(is_user_connected(id)) {
switch(cs_get_user_team(id)) {
case CS_TEAM_T: cs_set_user_team(id, CS_TEAM_CT);
case CS_TEAM_CT: cs_set_user_team(id, CS_TEAM_T );
}
}
}
set_pcvar_num(sv_restart, 1);
}
}
public EventRestartRound() {
gRound = 0;
}