Vice City: Multiplayer

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

Title: Setnick help
Post by: MixeR on August 23rd, 2019, 01:39 PM
Setnick??
Title: Re: Setnick help
Post by: umar4911 on August 23rd, 2019, 05:05 PM
player.Name
Title: Re: Setnick help
Post by: Alecu Madalin on August 23rd, 2019, 05: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 August 23rd, 2019, 05:42 PM
to change the nick:
Code: [Select]
player.Name = "poop"
Title: Re: Setnick help
Post by: Alecu Madalin on August 23rd, 2019, 07:26 PM
Quote from umar4911 on August 23rd, 2019, 05:42 PM
to change the nick:
Code: [Select]
player.Name = "poop"
makes sense now

Code: [Select]
function onPlayerJoin () {
    player.Name = "im_retarded"
}

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

Code: [Select]
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: Athanatos on August 24th, 2019, 11:29 AM
No, use this:
-removed-

Warning to you.