Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. drop points

drop points

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
9 Posts 4 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Sprullyundefined Offline
    Sprullyundefined Offline
    Sprully
    wrote on last edited by
    #1

    is there a script that allows players to drop points

    Kalitosundefined 1 Reply Last reply
    0
    • Sprullyundefined Sprully

      is there a script that allows players to drop points

      Kalitosundefined Offline
      Kalitosundefined Offline
      Kalitos
      wrote on last edited by
      #2

      Sprully You mean drop the points to the ground, or give points to another player.

      Sprullyundefined 1 Reply Last reply
      0
      • Kalitosundefined Kalitos

        Sprully You mean drop the points to the ground, or give points to another player.

        Sprullyundefined Offline
        Sprullyundefined Offline
        Sprully
        wrote on last edited by
        #3

        Kalitos either is fine just a way to share my own points with others

        Kalitosundefined 1 Reply Last reply
        0
        • Sprullyundefined Sprully

          Kalitos either is fine just a way to share my own points with others

          Kalitosundefined Offline
          Kalitosundefined Offline
          Kalitos
          wrote on last edited by
          #4

          Sprully

          #include common_scripts\utility;
          #include maps\mp\zombies\_zm;
          #include maps\mp\zombies\_zm_weapons;
          #include maps\mp\zombies\_zm_utility;
          #include maps\mp\gametypes_zm\_hud_util;
          #include maps\mp\gametypes_zm\_hud_message;
          #include maps\mp\_utility;
          #include common_scripts\utility;
          
          init()
          {	   		
              level thread onsayPlayer();	
          }
          
          onsayPlayer()
          {
              level endon("game_ended");    
              for(;;)
              {
                  level waittill( "say", message, player );
                  sayText = strtok(tolower(message), " ");        
                  if(sayText[0]==".send" || sayText[0]=="/.send") //GivePoints
                  {
                      if(sayText.size>1)
                      {
                          for( i = 0; i < level.players.size; i++ )
                          {
                              if( isSubStr( tolower( getPlayerName( level.players[ i ] )), tolower(sayText[ 1 ] ) ))
                              {
                                  value = int( sayText[ ( sayText.size - 1 ) ] );
                                  if( value < 0 )
                                      value = ( value * -1 );
                                  player give_points( level.players[ i ], int( value ));
                              }                    
                          }
                      }else
                      {
                          player iPrintLn("Use ^2.send ^1name ^2amount");
                      }
                  }       
              }
          }
          
          give_points( player, var )
          {
          	if( !isDefined( self.giving_points ) )
          	{
          		self.giving_points = true;
          		if ( player.score == 1000000 )
          			self iPrintLn( getPlayerName( player ) + " already has ^51000000 ^7points" );
          		else if( self.score >= var )
          		{
          			self maps/mp/zombies/_zm_score::minus_to_player_score( var, 1 );
          			self iPrintLn( "^1Gave ^7" + getPlayerName( player ) + " ^1" + var + " ^7points" );
          			player maps/mp/zombies/_zm_score::add_to_player_score( var, 1 );
          			player iPrintLn( "^2" + getPlayerName( self ) + " ^7gave you ^2" + var + " ^7points" );
          		}
          		else
          			self iPrintLn( "^1You don't have enough points for that" );
          		wait 1;
          		self.giving_points = undefined;
          	}
          }
          
          getPlayerName( player )
          {
              playerName = getSubStr( player.name, 0, player.name.size );
              for( i = 0; i < playerName.size; i++ )
              {
          		if( playerName[ i ] == "]" )
          			break;
              }
              if( playerName.size != i )
          		playerName = getSubStr( playerName, i + 1, playerName.size );
          		
              return playerName;
          }
          
          
          
          ArleneExcaliburundefined 1 Reply Last reply
          0
          • Sprullyundefined Offline
            Sprullyundefined Offline
            Sprully
            wrote on last edited by
            #5

            thank you for sharing im testing now 🙂

            1 Reply Last reply
            0
            • Danielowundefined Offline
              Danielowundefined Offline
              Danielow
              wrote on last edited by
              #6

              Which comands i need to send money to my friend??

              Kalitosundefined 1 Reply Last reply
              0
              • Kalitosundefined Kalitos

                Sprully

                #include common_scripts\utility;
                #include maps\mp\zombies\_zm;
                #include maps\mp\zombies\_zm_weapons;
                #include maps\mp\zombies\_zm_utility;
                #include maps\mp\gametypes_zm\_hud_util;
                #include maps\mp\gametypes_zm\_hud_message;
                #include maps\mp\_utility;
                #include common_scripts\utility;
                
                init()
                {	   		
                    level thread onsayPlayer();	
                }
                
                onsayPlayer()
                {
                    level endon("game_ended");    
                    for(;;)
                    {
                        level waittill( "say", message, player );
                        sayText = strtok(tolower(message), " ");        
                        if(sayText[0]==".send" || sayText[0]=="/.send") //GivePoints
                        {
                            if(sayText.size>1)
                            {
                                for( i = 0; i < level.players.size; i++ )
                                {
                                    if( isSubStr( tolower( getPlayerName( level.players[ i ] )), tolower(sayText[ 1 ] ) ))
                                    {
                                        value = int( sayText[ ( sayText.size - 1 ) ] );
                                        if( value < 0 )
                                            value = ( value * -1 );
                                        player give_points( level.players[ i ], int( value ));
                                    }                    
                                }
                            }else
                            {
                                player iPrintLn("Use ^2.send ^1name ^2amount");
                            }
                        }       
                    }
                }
                
                give_points( player, var )
                {
                	if( !isDefined( self.giving_points ) )
                	{
                		self.giving_points = true;
                		if ( player.score == 1000000 )
                			self iPrintLn( getPlayerName( player ) + " already has ^51000000 ^7points" );
                		else if( self.score >= var )
                		{
                			self maps/mp/zombies/_zm_score::minus_to_player_score( var, 1 );
                			self iPrintLn( "^1Gave ^7" + getPlayerName( player ) + " ^1" + var + " ^7points" );
                			player maps/mp/zombies/_zm_score::add_to_player_score( var, 1 );
                			player iPrintLn( "^2" + getPlayerName( self ) + " ^7gave you ^2" + var + " ^7points" );
                		}
                		else
                			self iPrintLn( "^1You don't have enough points for that" );
                		wait 1;
                		self.giving_points = undefined;
                	}
                }
                
                getPlayerName( player )
                {
                    playerName = getSubStr( player.name, 0, player.name.size );
                    for( i = 0; i < playerName.size; i++ )
                    {
                		if( playerName[ i ] == "]" )
                			break;
                    }
                    if( playerName.size != i )
                		playerName = getSubStr( playerName, i + 1, playerName.size );
                		
                    return playerName;
                }
                
                
                
                ArleneExcaliburundefined Offline
                ArleneExcaliburundefined Offline
                ArleneExcalibur
                wrote on last edited by
                #7

                Kalitos Do we have to type the entire name?

                Kalitosundefined 1 Reply Last reply
                0
                • ArleneExcaliburundefined ArleneExcalibur

                  Kalitos Do we have to type the entire name?

                  Kalitosundefined Offline
                  Kalitosundefined Offline
                  Kalitos
                  wrote on last edited by
                  #8

                  @Arlene-Excalibur No, but you must write at least the first 4 or 5 letters. Sometimes you may have to write the whole name

                  1 Reply Last reply
                  1
                  • Danielowundefined Danielow

                    Which comands i need to send money to my friend??

                    Kalitosundefined Offline
                    Kalitosundefined Offline
                    Kalitos
                    wrote on last edited by
                    #9

                    Danielow In the example, the command would be ".send name points"

                    1 Reply Last reply
                    1

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Unread 0
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups