Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Опубликовано:

Hi all, I'm working on a little script to make it so no one call a call a nuke until on of the two teams have reached a defined score; i cant seem to find what function the score is :P

 

 

hopeing something like this wold work?

 

trynuke()
{
   self endon ( "disconnect" );
   self endon ( "death" );

minscore = 45000;

  while(1)
  {


     self waittill ("used_nuke");  //guessing that's right? 
     if( score_is_over_the_prediefined_number  )
     { } else {  self iprintlnBold( "Please Wait for one team to reach 45000 Score." ); }

wait 0.5;

  }
}

 

Any help would be greatly appreciated,

 

 

Thanks. :)

Featured Replies

Опубликовано:

Wow thanks.

 

Edit:

 

Error: uninitialised variable 'team' at file maps/mp/gametypes/_rank.gsc, line 750:
     if(GetTeamScore( team) >= "45000"  && GetTeamScore( getOtherTeam( team ) ) >= "45000" )

Опубликовано:
JoeyB":1pjv7i20]I figured you would had realized that I meant to fill in team with "allies" or "axis".

 

._.

 

i did. :roll:

 

 

EDIT: oopes sorry, i see i posted the first error :lol:

 

trynuke()
{
   self endon ( "disconnect" );
   self endon ( "death" );



  while(1)
  {


     self waittill ("used_nuke");  //guessing that's right? 
     if(GetTeamScore( allies ) >= "15000" && GetTeamScore( getOtherTeam( axis ) ) >= "15000")
     { 
  } else {  self iprintlnBold( "Please Wait for one team to reach 45000 Score." ); }

wait 0.5;

  }
}

 

:arrow:

Error: uninitialised variable 'allies' at file maps/mp/gametypes/_rank.gsc, line 750:
     if(GetTeamScore(allies) >= "45000"  && GetTeamScore( getOtherTeam(axis) ) >= "45000" )

Опубликовано:

It's a string. Therefor it needs "s around it.

Also if you do GetTeamScore( "allies" ) then GetTeamScore( getOtherTeam( "axis" ) )

 

It's going to get the score for allies twice, and not axis, since the 'other team' from axis is allies.

 

if(GetTeamScore( "allies" ) >= "45000"  && GetTeamScore( getOtherTeam( "allies" ) ) >= "45000" )

or

if(GetTeamScore( "allies" ) >= "45000"  && GetTeamScore( "axis" ) >= "45000" )

Опубликовано:
JoeyB":25qhygcz]I forgot a ), my mistake:

if(GetTeamScore( team ) ) >= "45000"  && GetTeamScore( getOtherTeam( team ) ) >= "45000" )

 

 

oh ok, Np thanks for the help. :)

 

 

EDIT: ah i forgot the "s :oops: Thanks again! :lol:

Опубликовано:

Check my edit, I'm a retard.

I didn't forget an ).

 

Sorry I've been up for >24 hours and my mind is constantly losing focus.

 

 

On a side note, I personally don't see how this is going to work. Why not just edit _nuke.gsc and add something remotely similar? >_<

 

Опубликовано:

******* script compile error *******

Howdy there, fella' - it seems you made a mistake!

Error: bad syntax at file maps/mp/gametypes/_rank.gsc, line 516:

if(GetTeamScore( "allies" ) ) >= "35000" && GetTeamScore( "axis" ) >= "35000" )

*

************************************

Опубликовано:
JoeyB":146b82vv]I told you I didn't forget a ).

Remove the 4th ) in that. Boom fixed!

 

A thx.

Опубликовано:
******* script compile error *******

Howdy there, fella' - it seems you made a mistake!

Error: bad syntax at file maps/mp/gametypes/_rank.gsc, line 516:

if(GetTeamScore( "allies" ) ) >= "35000" && GetTeamScore( "axis" ) >= "35000" )

*

************************************

 

The actual value you compare the team scores with have to be integers, not strings(at least, i'd guess so)....also, watch the brackets...

 

if(GetTeamScore( "allies" ) >= 35000  && GetTeamScore( "axis" ) >= 35000 )

Опубликовано:

You are a little bit confused :)

 

1 -

self waittill ("used_nuke");

This is called after the nuke timer start, you dont need this.

 

2 -

wait 0.5;

This is not required since this isnt an infinite loop, because previusly you have added

self waittill ("used_nuke");

 

Like [ExP] JoeyB and banz said you have to use this code:

if( ( GetTeamScore( "allies" ) < minScore ) && ( GetTeamScore( "axis" ) < minScore ) )

 

The easy way to stop a nuke is adding this little little code on _nuke.gsc like I did http://pastebin.com/XaKFs8EV (Tested and working :))

if( ( GetTeamScore( "allies" ) < minScore ) && ( GetTeamScore( "axis" ) < minScore ) )
{
self iprintlnBold( "Please Wait for both team reach"+minScore+" Score." );
return false;
}

Опубликовано:

True, nice one

 

however i just Jimmie rigged the _nuke.gsc so it waited for the script in _rank to tell it to go or not ;P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Account

Navigation

Поиск

Поиск

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.