Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This updates the client with information from the server.
- script 199 (int updateWhat, int index, int value) clientside
- {
- if(consoleplayernumber() == playernumber())
- {
- if(updateWhat == statusMoreTurrets)
- {
- moreTurrets[index] = value;
- }
- else if(updateWhat == statusAdvTurrets)
- {
- AdvancedTurrets[index] = value;
- }
- else if(updateWhat == statusAdvMechs)
- {
- AdvancedMechResearch[index] = value;
- }
- else if(updateWhat == statusTeam)
- {
- clientTeam = value;
- }
- else if(updateWhat == statusPortals)
- {
- Portals[index] = value;
- }
- else if(updateWhat == statusDrones)
- {
- tiberiumdrones[index] = value;
- }
- else if(updateWHat == statusUpdateBaseHud)
- {
- valueholdingarray[BaseHUDUpdate] = value;
- }
- }
- }
- //debug script.
- /*
- script 200 enter clientside
- {
- if(consoleplayernumber() == playernumber())
- {
- if(clientTeam == team_red)
- log(s:"ur team red");
- else
- log(s:"ur team blue");
- log(s:"advanced turret is: ", d:AdvancedTurrets[clientTeam]);
- delay(35);
- restart;
- }
- }
- */
- //Server tells client about variables.
- function void updateClientInfo(int updateWhat)
- {
- if(updateWhat == statusResearch)
- {
- for(int i = 0; i <= 1; i++)
- {
- acs_executealways(199, 0, statusMoreTurrets, i, moreTurrets[i]);
- acs_executealways(199, 0, statusAdvTurrets, i, AdvancedTurrets[i]);
- acs_executealways(199, 0, statusAdvMechs, i, AdvancedMechResearch[i]);
- }
- }
- else if(updateWhat == statusTeam)
- {
- acs_executealways(199, 0, statusTeam, 0, playerteam());
- }
- else if(updateWhat == statusPortals)
- {
- acs_executealways(199, 0, statusPortals, 0, portals[0]);
- acs_executealways(199, 0, statusPortals, 1, portals[1]);
- }
- else if(updateWhat == statusDrones)
- {
- acs_executealways(199, 0, statusDrones, playernumber(), tiberiumdrones[playernumber()]);
- }
- else if(updateWhat == statusUpdateBaseHud)
- {
- acs_executealways(199, 0, statusUpdateBaseHud, 0, 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement