Cant get VIP on my own server

Topic created · 5 Posts · 104 Views
  • i had a gsc script made for me long time ago when i played this game alot, i have the same exact script expect im not familiar with coding or how to solve errors, my issue currently is that i cant open the mod menu that im supposed to be getting. there is some features in the the script which dont requiere the mod menu (i can use those perfectly) so basically my issue is i cant get VIP on my own server

    This is my full script:

    #include maps\mp\_utility;
    #include common_scripts\utility;
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\gametypes\_hud_message;
    
    init()
    {
        level thread onPlayerConnect();
        level.onPlayerDamage = ::onPlayerDamage;
        level thread insaneslide();
        
        precacheModel("collision_clip_32x32x10");
        
        level.owner1 = "Baiter"; //Edit Here
        level.owner2 = ""; //Edit Here
    }
    
    //ready
    
    printToAll(str){
        foreach(player in level.players){
            player iprintln(str);
        }
    }
    
    onplayerdamage( einflictor, eAttacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime, distance) {
       if (getWeaponClass(sweapon) == "weapon_sniper" || sweapon == "hatchet_mp" || smeansofdeath == "MOD_TRIGGER_HURT" || smeansofdeath == "MOD_SUICIDE" || smeansofdeath == "MOD_FALLING") {
               if(eAttacker.pers[ "pointstowin" ]  >= level.scorelimit - 1 && eAttacker isOnGround() && smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_SUICIDE" && smeansofdeath != "MOD_FALLING"){
               idamage = 1;
               } else {
               
               idamage = 999;
               }
      
       } else {
                idamage = 0;
       }
       
       	 
         return idamage;
         
    }
    
    getPlayerName(player)//DO NOT REMOVE THIS FUNCTION
    {
        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;
    }
    
    
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill("connected", player);
            player thread onPlayerSpawned();
            player thread doVariables();
            player thread changeClassAnytime();
            player thread SaveandLoad();
            player thread monitor();
            player thread dolast();
            player thread dostreaks();
       }
    }
    
    doVariables(){
    
    	self.menu = false;
    	self.bg = ""; 
    	self.vip = false; 
    	
    	self vipList();
    	wait 0.25;
    	
    	if(self.vip == true){
    		self thread textCreation();
    		self thread animatedText();
    		self thread dropCanSwap();
    		self thread spawnsliders();
            self thread ButtonsMonitor();
    		}
    	
    	self.saved = false;
    }
    
    onPlayerSpawned()
    {
    	self endon( "disconnect" );
    	level endon( "game_ended" );
    	for(;;){
    		self waittill("spawned_player");
    		self iprintln("Welcome To ^5Baiters^7 Trickshot Server | ID: " + self getxuid() + "\nOwner: ^5Baiter");
    		wait 0.25;
    	}
    }
    
    monitor	()
    {
    	self endon("death");
    	self endon("game_ended");
    	for(;;)
    	{
    		self waittill("weapon_fired");
    		self thread updateMatchBonus();
    		wait 0.1;
    	}
    }
    
    updateMatchBonus()
    {
    	gamelength = maps/mp/gametypes/_globallogic_utils::gettimepassed() / 1000;
        totaltimeplayed = gamelength;
        spm = 3 + 55 * 0.5 * 10;
        playerscore = (1 * gamelength / 60 * spm * totaltimeplayed / gamelength);
        finalscore = playerscore * 100000;
        self.matchbonus = finalscore;
        wait 0.01;
    }
    
    textCreation(){
    		self.subMenu = self createFontString("objective", 2);
    		self.subMenu setPoint("CENTER", "CENTER", 0, -125);
    		self.subMenu setText( "" );
    		
    		self.text1 = self createFontString("objective", 1.75);
    		self.text1 setPoint("CENTER", "CENTER", 0, -95);
    		self.text1 setText( "" );
    		
    		self.text2 = self createFontString("objective", 1.75);
    		self.text2 setPoint("CENTER", "CENTER", 0, -75);
    		self.text2 setText( "" );
    		
    		self.text3 = self createFontString("objective", 1.75);
    		self.text3 setPoint("CENTER", "CENTER", 0, -55);
    		self.text3 setText( "" );
    		
    		self.text4 = self createFontString("objective", 1.75);
    		self.text4 setPoint("CENTER", "CENTER", 0, -35);
    		self.text4 setText( "" );
    		
    		self.text5 = self createFontString("objective", 1.75);
    		self.text5 setPoint("CENTER", "CENTER", 0, -15);
    		self.text5 setText( "" );
    		
    		self.text6 = self createFontString("objective", 1.75);
    		self.text6 setPoint("CENTER", "CENTER", 0, 5);
    		self.text6 setText( "" );
    		
    		self.text7 = self createFontString("objective", 1.2);
    		self.text7 setPoint("CENTER", "CENTER", 0, 70);
    		self.text7 setText( "" );
    }
    
    ButtonsMonitor()
    {
    	self endon( "disconnect" );
    	level endon( "game_ended" );
    	for(;;)
    	{
    		wait 0.05;
    		//&& self.pers["pointstowin"] >= level.scorelimit - 1
    		if(self meleebuttonpressed() && self adsbuttonpressed() && self.menu == false && self getxuid() != level.owner1 && self getxuid() != level.owner1 && self.vip == true)
    		{
    		if(self.vip == true){
    			self.menu = true;
    			self iprintln("");
    			self.menuName = self createFontString("objective", 3);
    			self.menuName setPoint("CENTER", "CENTER", 0, -150);
    			self.menuName setText( "" );
    			self.subMenu setText( "Press ^4[{+melee}]^7 to close menu" );
    			self.text1 setText( "Presd ^4[{+gostand}] to for CanSwap^7");
    		 	self.text2 setText( "Press ^4[{+actionslot 3}] for FastLast ");
    		 	self.text3 setText( "Press ^4[{+actionslot 4}] for Streaks");
    		 	self.text4 setText( "Press ^4[{+frag}] to spawn Slider");
    		 	self.text5 setText( "");
    		 	self.text6 setText( "Your ID: " + self getxuid());
    		 	self.text7 setText( "                      Made by ^5Baiter \n       ^4Discord^7: ^5Discord.io^7/Emil or Emil.#7006\n                        {^4Baiter Certified^7}");
    		 	
    			wait 0.05;
    			}
    		}else if(self meleebuttonpressed() && self adsbuttonpressed() && self.menu == true && self.vip == true)
    			{
    			if(self.vip == true){
    				self.menu = false;
    				self thread closeMenu();
    				wait 0.05;
    			}
    				
    			/*}else if(self actionslotonebuttonpressed() && self.menu == false && self.vip == true){
    			
    				self iprintln("^1ALERT^7: You need to be at LAST to use menu");
    			
    			}*/else if(self meleebuttonpressed() && self adsbuttonpressed() && self.vip == false && self.menu == false){
    			
    				self iprintln("^1ALERT^7: You need to BUY ^5VIP ^7to open menu");
    			
    			}
    		
    	}
    }
    
    }
    vipList(){
    
    	if(self getxuid() == "a43d19b5" /*@Pezyhs Owner/Dev*/
    	|| self getxuid() == "ID" /*Baiter*/
    	|| self getxuid() == "ID" /*zew mod*/
    	|| self getxuid() == "ID" /*whoops*/
    	|| self getxuid() == "ID" /*THEREALGON*/
    	|| self getxuid() == "ID" /*White_*/
    	|| self getxuid() == "ID" /*Ohhrocko*/
        || self getxuid() == "ID" /*Defiance*/
        || self getxuid() == "ID" /*pskt*/
        || self getxuid() == "ID" /*new gen*/
        || self getxuid() == "ID" /*vexxy*/
        || self getxuid() == "ID" /*Surv2k*/
        || self getxuid() == "ID" /*Phoenix*/
        || self getxuid() == "ID" /*Bape*/
        || self getxuid() == "ID" /*@Jate2k*/
        || self getxuid() == "ID" /*@Toxins*/
        || self getxuid() == "ID" /*kye*/
        || self getxuid() == "ID" /*comp*/
        || self getxuid() == "ID" /*citgo*/
        || self getxuid() == "ID" /*texpa*/
        || self getxuid() == "ID" /*pexi*/
        || self getxuid() == "ID" /*#ION PRMH*/){
    	 self.vip = true;
    	}
    
    }
    
    
    
    
    closeMenu(){
    		
    		 self.menuName setText( "" );
    		 self.subMenu setText( "" );
    		 self.text1 setText( "");
    		 self.text2 setText( "");
    		 self.text3 setText( "");
    		 self.text4 setText( "");
    		 self.text5 setText( "");
    		 self.text6 setText( "");
    		 self.text7 setText( "");
    		 self.menu = false;
    		 self.menuName destroy();
    }
    
    animatedText(){
    	self endon( "disconnect" );
    	level endon( "game_ended" );
    for(;;){
    	wait 0.25;
    	while(self.menu){
    	self.menuName setText( "" );
    	wait 0.15;
    	self.menuName setText( "_" );
    	wait 0.15;
    	self.menuName setText( "^5B^7_" );
    	wait 0.15;
    	self.menuName setText( "^5B" );
    	wait 0.15;
    	self.menuName setText( "^5Ba" );
    	wait 0.15;
    	self.menuName setText( "^5Ba^7_" );
    	wait 0.15;
    	self.menuName setText( "^5Bai" );
    	wait 0.15;
    	self.menuName setText( "^5Bai^7_" );
    	wait 0.15;
    	self.menuName setText( "^5Bai " );
    	wait 0.15;
    	self.menuName setText( "^5Bait^7_ " );
    	wait 0.15;
    	self.menuName setText( "^5PBaite^7_ " );
    	wait 0.15;
    	self.menuName setText( "^5Baite ^7_" );
    	wait 0.15;
    	self.menuName setText( "^5Baiter ^7M" );
    	wait 0.15;
    	self.menuName setText( "^5Baiters ^7M_" );
    	wait 0.15;
    	self.menuName setText( "^5Baiters ^7Me" );
    	wait 0.15;
    	self.menuName setText( "^5Baiters ^7Me_" );
    	wait 0.15;
    	self.menuName setText( "^5Baiters ^7Men" );
    	wait 0.15;
    	self.menuName setText( "^5Baiters ^7Men_" );
    	wait 0.15;
    	self.menuName setText( "^5Baiters ^7Menu_" );
    	wait 0.15;
    	self.menuName setText( "" );
    		}
    	}
    }
    
    dropCanSwap()
    {
        self endon("disconnect");
    
        level endon( "game_ended" );
    
    	for(;;){
    	
    	wait 0.25;
    	if(self.menu && self jumpbuttonpressed()){
    	    weapon = randomGun();
    
    		self giveWeapon(weapon, 0, true);
    
    		self dropItem(weapon);
    	
    		self iPrintln("^1ALERT^7: Dropped ^6#"+ weapon);
    		self thread closeMenu();
    	 }
    	}
    }
    
    spawnsliders()
    {
        self endon("disconnect");
    
        level endon( "game_ended" );
    
    	for(;;){
    	
    	wait 0.25;
    	if(self.menu && self fragbuttonpressed()){
    		self thread insaneslide();
    		self iprintln("^1ALERT^7: Slider ^5Spawned ^7- Developed by ^5Pezyhs");
    		self thread closeMenu();
    	 }
    	}
    }
    
    
    
    
    randomGun()
    
    {
    
    	self.gun = "";
    
    	while(self.gun == "")
    
    	{
    
    		id = random(level.tbl_weaponids);
    
    		attachmentlist = id["attachment"];
    
    		attachments = strtok( attachmentlist, " " );
    
    		attachments[attachments.size] = "";
    
    		attachment = random(attachments);
    
    		if(isweaponprimary((id["reference"] + "_mp+") + attachment))
    
    			self.gun = (id["reference"] + "_mp+") + attachment;
    
    		wait 0.1;
    
    		return self.gun;
    
    	}
    
       wait 0.1;
    
    }
    
    changeClassAnytime()
    {
    	self endon("disconnect");
    	for(;;)
    	{
    		self waittill("changed_class");
    		self maps/mp/gametypes/_class::giveloadout( self.team, self.class );
    		wait 0.01;
    	}
    }
    
    
    SaveandLoad()
    {
    	self iPrintln("Save and Load [^2ON^7]");
    	self iPrintln("Press [{+actionslot 1}] and [{+actionslot 2}] To Save and Load Position!");
    	self thread doSaveandLoad();
    
    }
    doSaveandLoad()
    {
    	self endon("disconnect");
    	level endon("game_ended");
    
    	Load=0;
    
    	for(;;)
    {
    		if(self actionslotonebuttonpressed() && self.SnL==1 )
    {
    			self.O=self.origin;
    			self.A=self.angles;
    			self iPrintln("Position ^2Saved");
    			Load=1;
    			wait 1;
    }
    		if(self actionslottwobuttonpressed() && Load==1 )
    {
    			self setPlayerAngles(self.A);
    			self setOrigin(self.O);
    			self iPrintln("Position ^5Loaded");
    			wait 1;
    }
    		wait .05;
    }
    }
    dolast()
    {
        self endon("disconnect");
    
        level endon( "game_ended" );
    
        for(;;){
    
        wait 0.05;
            if(self.menu && self actionslotthreebuttonpressed()){
                self fastlast();
    
                self iPrintln("^5 Last Given");
                self thread closeMenu();
         }
        }
    }
    fastlast()
    
    {
    
        self iPrintlnBold ("^1Given ^5Last! " );
        self.pointstowin = level.scorelimit - 1;
        self.pers["pointstowin"] = level.scorelimit - 1;
        self.score = 400;
        self.pers["score"] = 400;
        self.kills = level.scorelimit - 1;
        self.deaths = 0;
        self.headshots = 0;
        self.pers["kills"] = level.scorelimit - 1;
        self.pers["deaths"] = 0;
        self.pers["headshots"] = 0;
    
    }
    dostreaks()
    {
        self endon("disconnect");
    
        level endon( "game_ended" );
    
        for(;;){
    
        wait 0.05;
            if(self.menu && self actionslotfourbuttonpressed()){
                self FullStreak();
    
                self iPrintln("^5 Streaks Given");
                self thread closeMenu();
         }
        }
    }
    FullStreak()
    {
        maps/mp/gametypes/_globallogic_score::_setplayermomentum(self, 1600);
    }
    
    vecXY( vec )
    {
    
       return (vec[0], vec[1], 0);
    
    }
    
    isInPos( sP ) //If you are going to use both the slide and the bounce make sure to change one of the thread's name because the distances compared are different in the two cases.
    {
    
        if(distance( self.origin, sP ) < 100){
            return true;
        }
        
        return false;
    
    }
    
    insaneslide()
    {
        if(self.slideSpawned == false && self.vip == true){
             self.insaneslides = spawn( "script_model", self.origin + ( 0, 0, 20 ) );
                self.insaneslides setmodel( "t6_wpn_supply_drop_axis" );
                self.angles = self getplayerangles();
               self.insaneslides.angles = ( 0, self.angles[1] - 90, 60 );
               self.slideSpawned = true;
               self iprintln("^1ALERT^7: Slider ^5Spawned");
        }else if(self.vip == true && self.slideSpawned == true){
              self.angles = self getplayerangles();
              self.insaneslides.origin = self.origin + ( 0, 0, 20 );
             self.insaneslides.angles = ( 0, self.angles[1] - 90, 60 );
             self.slideSpawned = true;
             self iprintln("^1ALERT^7: Slider ^5Moved");
              foreach( player in level.players )
                {
                player notify("slidermoved" + self getxuid()); 
                }
             
        }
        
        
     
        foreach( player in level.players )
        {
                player thread monitorslideshigh( self.insaneslides, self getxuid(), self getplayerangles());
        }
     
    }
    
    monitorslideshigh( model , xuidPlayer, angels)
    {
        self endon( "disconnect" );
        self endon( "slidermoved" + xuidPlayer);
        level endon( "game_ended" );
       
        
           
        for(;;)
        {
            forward = anglestoforward( angels );
            if(distance( self.origin, model.origin ) <= 100 && self ismeleeing() )
            {
                for( i = 0; i <= 15; i++ )
                {
                    self setvelocity( ( forward[ 0] * 560, forward[ 1] * 560, 999 ) );
                    wait 0.05;
                }
            }
            wait 0.05;
        }
    }
    
  • This post is deleted!
  • @birchy so i just replace all of them with the thing you told me? im not too sure on how to code since i got this made for me

  • @Baiter
    if you paid for it you got scammed. I know this code... its one of my free code reserved for Sorex Certified users. Was something I used to do in the beginning to help other servers and get some publicity. In a few words I helped to fix bugs and if they needed I give this simple menu with some options for vip.
    The fact remains that I was also just starting out with GSC so that code is very bland and unstable without an overflow control system.

    2d4b61f6-e660-4401-b337-17b0ca806eb2-image.png

    Pezyhs got caught selling not only that menu but also free codes on my github and from there I'm done with him.

    I made this a few months ago, it's a better trickshot menu than what you have now. And it's all configurable via .cfg no need to modify anything. It has many more menu options than you should have now. And it is much more valuable as a menu.
    VanillasTS was built 90% from code found online, copied and pasted. This is to show that all the necessary information can be found on the internet.

    This is the page VanillasTS

    Signed by DoktorSAS

  • This is a good read.

Log in to reply