Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: MixeR on Aug 23, 2019, 12:39 PM

Title: Setnick help
Post by: MixeR on Aug 23, 2019, 12:39 PM
Setnick??
Title: Re: Setnick help
Post by: umar4911 on Aug 23, 2019, 04:05 PM
player.Name
Title: Re: Setnick help
Post by: Alecu Madalin on Aug 23, 2019, 04:34 PM
http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Player.Name

(https://www.meme-arsenal.com/memes/091e294ad754ddf981ee679cb70f51ee.jpg)

(https://i.imgflip.com/18jc9a.jpg?a435096)

it doesnt exist a function called SetNick
Title: Re: Setnick help
Post by: umar4911 on Aug 23, 2019, 04:42 PM
to change the nick:
player.Name = "poop"
Title: Re: Setnick help
Post by: Alecu Madalin on Aug 23, 2019, 06:26 PM
Quote from: umar4911 on Aug 23, 2019, 04:42 PMto change the nick:
player.Name = "poop"

makes sense now

function onPlayerJoin () {
    player.Name = "im_retarded"
}

im wrong sry
Title: Re: Setnick help
Post by: Mursaleen5544 on Aug 24, 2019, 06:07 AM
Take GetTok function from forum and here is the code of command.

else if ( cmd == "setname" )
{
if ( !text ) PrivMessage( "Usage /" + cmd + " [Nick-ID] [Name]" ,player );
else
{
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if ( !plr ) PrivMessage( "Invalid player." ,player );
else
{
local name = GetTok( text, " ", 2 );
PrivMessage( "You have changed the name of "+plr.Name+" to "+name ,player );
plr.Name = name;
}
}
}
Title: Re: Setnick help
Post by: NicusorN5 on Aug 24, 2019, 10:29 AM
No, use this:
-removed-

Warning to you.