|
 |
AWE mapvote |
steinacker
Milupa-Fan
  
Dabei seit: 13.03.2008
Beiträge: 662

|
|
du willst das mapvoting vom awe umstrickken
na dann mal viel spaß
hab mal etwas in der _awe_mapvote.gsc gestöbert, eventuell könnte man in dieser funktion was ummodeln
Code angehängt. Klicke hier zum Ein-/Ausblenden
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
|
//Changes the players vote as he hits the attack button and updates HUD
PlayerVote()
{
level endon("VotingDone");
// No voting for spectators
if(self.pers["team"] == "spectator")
novote = true;
// Spawn player as spectator
self maps\mp\gametypes\_awe::spawnSpectator();
self.sessionstate = "spectator";
self.spectatorclient = -1;
resettimeout();
//remove the scoreboard
self setClientCvar("g_scriptMainMenu", "");
self closeMenu();
self allowSpectateTeam("allies", false);
self allowSpectateTeam("axis", false);
self allowSpectateTeam("freelook", false);
self allowSpectateTeam("none", true);
if(isdefined(novote))
return;
self.votechoice = 0;
colors[0] = (0 , 0, 1);
colors[1] = (0 ,0.5, 1);
colors[2] = (0 , 1, 1);
colors[3] = (0 , 1,0.5);
colors[4] = (0 , 1, 0);
self.vote_indicator = newClientHudElem( self );
self.vote_indicator.alignY = "middle";
self.vote_indicator.x = 208;
self.vote_indicator.y = level.awe_mapvotehudoffset + 75;
self.vote_indicator.archived = false;
self.vote_indicator.sort = 9998;
self.vote_indicator.alpha = .3;
self.vote_indicator.color = colors[0];
self.vote_indicator setShader("white", 254, 17);
for (;;)
{
wait .01;
if(self attackButtonPressed() == true)
{
self.votechoice++;
if (self.votechoice == 5)
self.votechoice = 0;
self iprintln("You have voted for ^2" + level.mapcandidate[self.votechoice]["mapname"]);
self.vote_indicator.y = level.awe_mapvotehudoffset + 77 + self.votechoice * 16;
self.vote_indicator.color = colors[self.votechoice];
self playLocalSound("hq_score");
}
while(self attackButtonPressed() == true)
wait.01;
self.sessionstate = "spectator";
self.spectatorclient = -1;
}
}
|
|
__________________ Steinacker, Hans Adam - der letzte Scharfrichter von Bad Mergentheim
der mit der Schärfe eines Schwertes richtende
|
|
|
|
|
|
|
|
 |
Impressum ||Datenschutzerklärung
|