Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: BigcaT_ on Apr 19, 2015, 09:34 AM

Title: Let's Walk!
Post by: BigcaT_ on Apr 19, 2015, 09:34 AM

stingray <- null;
walkingp <- array( GetMaxPlayers(), false );
else if (cmd == "walk")
{
if (text && IsNum(text))
{
if ( status[player.ID].walkingp == false )
{
stingray <- NewTimer("walking",500,1,player.ID,text.tointeger());
      status[player.ID].walkingp = true;
}
else MessagePlayer("You are walking.",player);
}
else MessagePlayer("/walk id",player);
}
    else if (cmd == "stopwalk")
{
stingray.Stop();
status[player.ID].walkingp = false;
}
function walking(p, text)
{
local player = FindPlayer(p);
player.SetAnim(text);
stingray <- NewTimer("walking",100,1,p,text);
}

To walk, type /walk 0.
to run, type /walk 1.
I know this is very laggggg!
but it's really cool and useful for film.
Title: Re: Let's Walk!
Post by: Thijn on Apr 19, 2015, 04:09 PM
That will spawn another timer every time someone else uses it. Please, test your snippets with multiple people before releasing it.
Title: Re: Let's Walk!
Post by: Finch on Apr 20, 2015, 03:53 AM
BigCat i check it out it cool
But its Lag