Random Gms
#1

Is there a way to make a score count of both teams so each time they kill someone theyre teams total killcount will show for everyone.

Also is there a way once a timer is done the gamemode will change into a random one?
Reply
#2

Well your question answers would be: Yes there are ways to both of them. To make score count to both teams just create 2 new vars like this:

new teamkillcount1;
new teamkillcount2;


OnPlayerDeath

check if the killer is from one team(if you have it defined)

teamkillcount1++;
new str[24];
format(str,sizeof(str),"Team one now has: %d kills",teamkillcount1);
SendClientMessageToAll(COLOR,str);

check if the killer is from other team(if you have it defined)

teamkillcount2++;
format(str,sizeof(str),"Team two now has: %d kills",teamkillcount2;
SendClientMessageToAll(COLOR,str);

That is of course if you use messages. If you want to use a textdraw check wiki, it has a good explanation.



For the gamemode changing part there is a simple way:

new GameModes[][] = {
{"lvdm"},{"grandlarc"} // Put in bunch of game mode names you want to change here
};

after this is done put on a timer ongamemodeinit or somewhere to set it for the first time to count to a gamemode change. ex: SetTimer("GMChange",3000000,0); // Not repeatable,changes after 5mins

in the timer callback put:

public GMChange();
{
SendRconCommand("changemode",random(GameModes));
}

and that should be it.
P.s code untested writed it asap. GL.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)