Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Giant & Shrink mod

  1. #1

    Default Giant & Shrink mod

    //***************************Giant****************************//
    //Giant:
    Red:

    {
    local.trig waitTill trigger
    local.trig message "You are a Giant for 1 minute"
    local.trig setthread Giant
    local.p = parm.other
    local.player.scale = 5
    wait 1
    }

    Giant:
    self waittill trigger
    local.player=parm.other
    if (local.player.Giant==1)
    end
    local.player.Giant=1
    local.player.scale = 5
    wait 1
    local.player.Giant=0

    //*************************Shrink****************************//
    //Shrink
    Blue:

    local.trig waitTill trigger
    local.trig message "You are Shrink for 1 minute"
    local.trig setthread Shrink
    local.p = parm.other
    local.player.scale = .2
    wait 1
    }

    Shrink:
    self waittill trigger
    local.player=parm.other
    if (local.player.Shrink==1)
    end
    local.player.Shrink=1
    local.player.scale = .5
    wait 1
    local.player.Shrink=0

    end
    Last edited by Old Fox; March 25th, 2019 at 10:55 PM.

  2. #2

    Default

    download a admin pro.

  3. #3

    Default

    Not sure where this script is from but it doesn't look right at a glance.

    Something like:

    Code:
    Red:
    	local.marker = spawn script_model model "models/player/german_Scientist.tik" origin ( 28 944 48 ) angle ( 270 ) scale 1
    
    	local.trig = spawn trigger_multiple origin (local.marker.origin)
    	local.trig setsize ( -50 -50 0) ( 50 50 100)
    	local.trig setthread Giant
    end
    
    Giant:
    	local.player = parm.other
    	if (local.player.giant == 1)
    		end
            iprintlnbold "Making a giant for 1 minute"
    	local.player.giant = 1
    	local.player.scale = 5
    	wait 60
    	local.player.giant = 0
    	local.player.scale = 1
    end
    ...seems better. But I don't know what it is or what else is missing so I'm just guessing.

  4. #4

    Default

    yeah but he wants to do it without a trigger and use console command so he'll need to use a admin menu to do that or admin pro or Jim's punishments 2 something along those lines.

  5. #5

    Default

    Yep, I know that. This is just to help him with scripting in general.

  6. #6
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    it's called a 3rd person mini mod, look it up it exists,

  7. #7

    Default

    btw i have the Admin-Pro_1.22_+jims
    Last edited by Old Fox; March 25th, 2019 at 10:56 PM.

  8. #8

    Default

    This script shrinks the player you whant with a command:


    while(1)
    {
    wait 0.02

    local.shrink_player = getcvar "shrink"

    if(local.shrink_player != "")
    {

    for(local.i = 1;local.i <= $player.size;local.i++)
    {

    local.player = $player[local.i]

    if(local.player == NULL)
    end

    if(local.player.entnumb == int(local.shrink_player))
    {

    thread shrink_player local.player

    }

    }

    setcvar "shrink" ""

    }
    }

    end

    shrink_player local.player:

    if(local.player.shrink != 1)
    {

    local.player.shrink = 1

    local.player scale 0.5

    thread check_alive local.player

    }

    end

    check_alive local.player:

    while(isalive local.player)
    waitframe

    local.player.shrink = 0

    end

    Last edited by DoubleKill; May 23rd, 2018 at 02:07 AM.

  9. #9

    Default

    Thanks, DK. Maybe if you want to incorporate a timer (also you had entnumb instead of entnum):

    Code:
    check_shrink:
    
    	while (1)
    	{
    		local.shrink_player = getcvar "shrink"
    
    		if (local.shrink_player != "")
    		{	
    			for (local.i = 1;local.i <= $player.size;local.i++)
    			{
    				local.player = $player[local.i]
    				
    				if ((local.player == NULL) || (local.player.shrink == 1))
    					continue
    				
    				if (local.player.entnum == int(local.shrink_player))
    					thread shrink_player local.player
    			}
    			setcvar "shrink" ""
    		}
    
    		waitframe
    	}
    end
    
    shrink_player local.player:
    	
    	local.player.shrink = 1
    	local.player scale 0.5
    
    	thread check_alive local.player
            thread shrink_duration local.player 60 // these could be merged
    end
    
    
    check_alive local.player:
    	
    	while ((isAlive local.player) && (local.player.shrink == 1))
    		wait .5
    
    	if ((local.player) && (local.player.shrink == 1))
    		local.player.shrink = 0
    		
    end
    
    shrink_duration local.player local.time:
    
    	while ((local.player.shrink == 1) && (local.time > 0) && (local.player))
    	{
    		wait 1
    		local.time--
    	}
    			
    	if ((local.player.shrink == 1) && (local.player))
    	{
    		local.player.shrink = 0
    		local.player.scale = 1
    	}
    end
    I did it quickly so might be naff... I'm tired this morning lol.
    Last edited by 1337Smithy; May 23rd, 2018 at 06:08 AM.

  10. #10

    Default

    ok i must add this scr in the map scr then test in the server
    Last edited by Old Fox; March 25th, 2019 at 10:56 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •