Freeze And Unfreeze PLAYER

Started by W3aPoN^, Jul 23, 2016, 01:38 PM

Previous topic - Next topic

W3aPoN^

Hello i Need Freeze And Unfreeze Command Thanks In Advance Using 0.4 Server

Kewun

#1
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

W3aPoN^

Bro Snippts Are Not Working In My 0.4 Main.Nut File What To DO?

Kewun

they work

Then fix it if wont work.

if u cant copy/paste..

W3aPoN^

#4
Bro What Are Snippets Are They .NUT Files We Need To Create In Scripts Folder?

KAKAN

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.
oh no

W3aPoN^

I Know But What Can I Do I Want To Make A Professional Server Please HELP Me GUYS Thanks

Finch Real

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
My Snipet Showroom

http://pastebin.com/5KKuU5cg

KAKAN

Commands were posted, it looks like a copy paste of them just with a bit editing.
oh no

Finch Real

I haven't copy paste them if i have created it from scratch
My Snipet Showroom

http://pastebin.com/5KKuU5cg

MEGAMIND

take it from warcheifs or fbs or vbs

Finch Real

Why need of them when it is provided here?
My Snipet Showroom

http://pastebin.com/5KKuU5cg

Stormeus

@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.

W3aPoN^

Sorry Stormeus :( And Thanks Finch Real :D