Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: W3aPoN^ on Jul 23, 2016, 01:38 PM

Title: Freeze And Unfreeze PLAYER
Post by: W3aPoN^ on Jul 23, 2016, 01:38 PM
Hello i Need Freeze And Unfreeze Command Thanks In Advance Using 0.4 Server
Title: Re: Freeze And Unfreeze PLAYER
Post by: Kewun on Jul 23, 2016, 01:43 PM
function onPlayerCommand(p,c,t)
{
    if(c=="f")
    {
     if (!t) MessagePlayer("Specify id player to freeze, /f id",p)
     local targ = FindPlayer(text.tointeger())
     if(targ)
    {
      targ.Frozen  = true
    }
    }
    else if(c=="unf")
    {
     if (!t) MessagePlayer("Specify id player to unfreeze, /unf id",p)
     local targ = FindPlayer(text.tointeger())
     if(targ)
    {
      targ.Frozen  = false
    }
  }
}

do us a 1 favor after that.

STOP USING A DAMN BIG FONT SIZE!

edit: i wrote this snippet real quick. i didnt have time to test it but it SHOULD work
Title: Re: Freeze And Unfreeze PLAYER
Post by: W3aPoN^ on Jul 23, 2016, 01:57 PM
Bro Snippts Are Not Working In My 0.4 Main.Nut File What To DO?
Title: Re: Freeze And Unfreeze PLAYER
Post by: Kewun on Jul 23, 2016, 01:58 PM
they work

Then fix it if wont work.

if u cant copy/paste..
Title: Re: Freeze And Unfreeze PLAYER
Post by: W3aPoN^ on Jul 23, 2016, 02:02 PM
Bro What Are Snippets Are They .NUT Files We Need To Create In Scripts Folder?
Title: Re: Freeze And Unfreeze PLAYER
Post by: KAKAN on Jul 23, 2016, 03:37 PM
Quote from: razacharan on Jul 23, 2016, 02:02 PMBro What Are Snippets Are They .NUT Files We Need To Create In Scripts Folder?
you're a real profession mate, Squirrel is not for you.
Title: Re: Freeze And Unfreeze PLAYER
Post by: W3aPoN^ on Jul 23, 2016, 04:22 PM
I Know But What Can I Do I Want To Make A Professional Server Please HELP Me GUYS Thanks
Title: Re: Freeze And Unfreeze PLAYER
Post by: Finch Real on Jul 23, 2016, 05:04 PM
He is not that professional to fix p t c
@razacharan add this onplayercommand
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "freeze" )
{
if ( !text ) PrivMessage( player, "Hey use /freeze <Playername>" );
local plr = FindPlayer( text );
if ( !plr ) PrivMessage( player, "Invalid Player" );
else
{
Message( " " + player.Name + " has frozen " + plr.Name + " " );
plr.IsFrozen = true;
}
}
else if ( cmd == "unfreeze" )
{
if ( !text ) PrivMessage( player, "Hey use /unfreeze <Playername>" );
local plr = FindPlayer( text );
if ( !plr ) PrivMessage( player, "Invalid Player" );
else
{
Message( " " + player.Name + " has unfrozen " + plr.Name + " " );
plr.IsFrozen = false;
}
}
}

Note;I have creaed it using my mobile and haven't tested it
Title: Re: Freeze And Unfreeze PLAYER
Post by: KAKAN on Jul 23, 2016, 05:55 PM
Commands were posted, it looks like a copy paste of them just with a bit editing.
Title: Re: Freeze And Unfreeze PLAYER
Post by: Finch Real on Jul 23, 2016, 06:27 PM
I haven't copy paste them if i have created it from scratch
Title: Re: Freeze And Unfreeze PLAYER
Post by: MEGAMIND on Jul 23, 2016, 07:05 PM
take it from warcheifs or fbs or vbs
Title: Re: Freeze And Unfreeze PLAYER
Post by: Finch Real on Jul 23, 2016, 08:47 PM
Why need of them when it is provided here?
Title: Re: Freeze And Unfreeze PLAYER
Post by: Stormeus on Jul 23, 2016, 10:24 PM
@razacharan Please just figure out all the features you want in your script and just make one thread for that instead of spamming ten threads a day. Also, stop posting your requests in the General Discussion board.
Title: Re: Freeze And Unfreeze PLAYER
Post by: W3aPoN^ on Jul 24, 2016, 02:52 AM
Sorry Stormeus :( And Thanks Finch Real :D