Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Coolkid on May 05, 2016, 10:51 AM

Title: Pickup to teleport to another server
Post by: Coolkid on May 05, 2016, 10:51 AM
As the topic says is it possible to teleport a player to another server using a pickup
Title: Re: Pickup to teleport to another server
Post by: Thijn on May 05, 2016, 11:02 AM
Sure. Show us some code you tried.
Title: Re: Pickup to teleport to another server
Post by: Coolkid on May 05, 2016, 11:05 AM
Quote from: Thijn on May 05, 2016, 11:02 AMSure. Show us some code you tried.
Wait 6 hours xd I am in school will give when I am back homr
Title: Re: Pickup to teleport to another server
Post by: Coolkid on May 05, 2016, 11:16 AM
K made on mobile can you see if it is correct function onPickupPickedUp( player, pickup )
{
 if( pickup.Model == 280 )
{
pickup.Timer = 30000;
player.Redirect("146.185.143.200", 8192, player.Name, "", "");
 }
}
Title: Re: Pickup to teleport to another server
Post by: DizzasTeR on May 05, 2016, 11:29 AM
It will work but the player will need to type the command /redirect ( If I remember correct ) to get redirected. It is not direct, it would be better if we can do it without prompt though.
Title: Re: Pickup to teleport to another server
Post by: KAKAN on May 05, 2016, 12:08 PM
Quote from: Doom_Kill3R on May 05, 2016, 11:29 AMIt will work but the player will need to type the command /redirect ( If I remember correct ) to get redirected. It is not direct, it would be better if we can do it without prompt though.
we can I think. Redirect works like that with the latest squirrel plugin.
Title: Re: Pickup to teleport to another server
Post by: EK.IceFlake on May 05, 2016, 12:15 PM
Quote from: Doom_Kill3R on May 05, 2016, 11:29 AMIt will work but the player will need to type the command /redirect ( If I remember correct ) to get redirected. It is not direct, it would be better if we can do it without prompt though.
Its /allowredirect. We do not want any security flaws, so for example people might send him with for example an impersonating name to his favorite server and then he will get banned for impersonating, which is mainly the reason we haven't used that way.
[spoiler]sorry for acting like a dev[/spoiler]
Title: Re: Pickup to teleport to another server
Post by: DizzasTeR on May 05, 2016, 05:28 PM
Quote from: ext-d.CrystalBlue on May 05, 2016, 12:15 PM
Quote from: Doom_Kill3R on May 05, 2016, 11:29 AMIt will work but the player will need to type the command /redirect ( If I remember correct ) to get redirected. It is not direct, it would be better if we can do it without prompt though.
Its /allowredirect. We do not want any security flaws, so for example people might send him with for example an impersonating name to his favorite server and then he will get banned for impersonating, which is mainly the reason we haven't used that way.
[spoiler]sorry for acting like a dev[/spoiler]
Why is there a nickname type of useless parameter in there at the first place.
Title: Re: Pickup to teleport to another server
Post by: EK.IceFlake on May 06, 2016, 03:56 AM
Quote from: Doom_Kill3R on May 05, 2016, 05:28 PM
Quote from: ext-d.CrystalBlue on May 05, 2016, 12:15 PM
Quote from: Doom_Kill3R on May 05, 2016, 11:29 AMIt will work but the player will need to type the command /redirect ( If I remember correct ) to get redirected. It is not direct, it would be better if we can do it without prompt though.
Its /allowredirect. We do not want any security flaws, so for example people might send him with for example an impersonating name to his favorite server and then he will get banned for impersonating, which is mainly the reason we haven't used that way.
[spoiler]sorry for acting like a dev[/spoiler]
Why is there a nickname type of useless parameter in there at the first place.
Most likely because /connect also has a nickname parameter which turned out to be really useful.
Title: Re: Pickup to teleport to another server
Post by: Xmair on May 06, 2016, 08:14 AM
This might be a bit off topic but what is the "userpass" in the /connect and CPlayer.Redirect?
Title: Re: Pickup to teleport to another server
Post by: Anik on May 06, 2016, 08:21 AM
Quote from: Xmair on May 06, 2016, 08:14 AMThis might be a bit off topic but what is the "userpass" in the /connect and CPlayer.Redirect?
The Password of the player. Like if you want to change it you can use that
Title: Re: Pickup to teleport to another server
Post by: Xmair on May 06, 2016, 09:48 AM
What?
Title: Re: Pickup to teleport to another server
Post by: Stormeus on May 06, 2016, 10:09 AM
Quote from: Xmair on May 06, 2016, 09:48 AMWhat?

VC:MP has a buried feature for users to give the server their password through the client rather than through the script, which is what the OnIncomingConnection (https://bitbucket.org/stormeus/0.4-squirrel/src/6bb87ccac01ade3cce5af79574b382bf6ac90f0f/VCMP.h?fileviewer=file-view-default#VCMP.h-896) event is for in the plugin API. It's not available in the browser, so no client ever sends it.

Personally I didn't really see a point for it since some users might have different passwords for each server, or no password on other servers, and there's really no good way to have the current simple browser while constantly prompting for a user password on each server. Having a global setting for user password would just encourage people to use the same password on all servers.

It still exists in the underlying client and server, though, so the server redirect functions retain a parameter for the user's password.
Title: Re: Pickup to teleport to another server
Post by: maxorator on May 06, 2016, 10:29 AM
Quote from: Stormeus on May 06, 2016, 10:09 AMPersonally I didn't really see a point for it since some users might have different passwords for each server, or no password on other servers, and there's really no good way to have the current simple browser while constantly prompting for a user password on each server. Having a global setting for user password would just encourage people to use the same password on all servers.
The initial idea was to make the client ask the user for the password if OnIncomingConnection rejects the user, but this was never implemented. For the browser, it could work the same way the server password does.

Currently the redirect feature could actually use it for something like only allowing connections to a server via redirect, by using some key as user password without which the server does not allow incoming connections.
Title: Re: Pickup to teleport to another server
Post by: DizzasTeR on May 06, 2016, 10:50 AM
But I guess that making player type /allowredirect is pretty frustrating sometimes depending on the conditions when you are redirecting player and its possible that the case also includes no approach for a player to read chat. In these situations a redirect without prompt and also without any nick change should be available.
Title: Re: Pickup to teleport to another server
Post by: KAKAN on May 06, 2016, 10:55 AM
Quote from: Doom_Kill3R on May 06, 2016, 10:50 AMBut I guess that making player type /allowredirect is pretty frustrating sometimes depending on the conditions when you are redirecting player and its possible that the case also includes no approach for a player to read chat. In these situations a redirect without prompt and also without any nick change should be available.
Suppose, a player loves LW server, and loves Impersonating. So, if he impersonates someone on 'a' server, then the owner can easily redirect him to other server to get him/her banned.
Title: Re: Pickup to teleport to another server
Post by: Stormeus on May 06, 2016, 10:59 AM
Quote from: maxorator on May 06, 2016, 10:29 AMThe initial idea was to make the client ask the user for the password if OnIncomingConnection rejects the user, but this was never implemented.

Well, now that we have MGUI we probably could afford to add a prompt for that. ¯\_(ツ)_/¯
Title: Re: Pickup to teleport to another server
Post by: Xmair on May 06, 2016, 12:30 PM
Quote from: KAKAN on May 06, 2016, 10:55 AM
Quote from: Doom_Kill3R on May 06, 2016, 10:50 AMBut I guess that making player type /allowredirect is pretty frustrating sometimes depending on the conditions when you are redirecting player and its possible that the case also includes no approach for a player to read chat. In these situations a redirect without prompt and also without any nick change should be available.
Suppose, a player loves LW server, and loves Impersonating. So, if he impersonates someone on 'a' server, then the owner can easily redirect him to other server to get him/her banned.
Why is there even a nickname parameter then? ( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)
Title: Re: Pickup to teleport to another server
Post by: ysc3839 on May 06, 2016, 01:13 PM
Quote from: Xmair on May 06, 2016, 12:30 PM
Quote from: KAKAN on May 06, 2016, 10:55 AM
Quote from: Doom_Kill3R on May 06, 2016, 10:50 AMBut I guess that making player type /allowredirect is pretty frustrating sometimes depending on the conditions when you are redirecting player and its possible that the case also includes no approach for a player to read chat. In these situations a redirect without prompt and also without any nick change should be available.
Suppose, a player loves LW server, and loves Impersonating. So, if he impersonates someone on 'a' server, then the owner can easily redirect him to other server to get him/her banned.
Why is there even a nickname parameter then? ( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)
I hope the browser could inside the client. Like MTA:SA.
Title: Re: Pickup to teleport to another server
Post by: DizzasTeR on May 06, 2016, 03:38 PM
Quote from: KAKAN on May 06, 2016, 10:55 AM
Quote from: Doom_Kill3R on May 06, 2016, 10:50 AMBut I guess that making player type /allowredirect is pretty frustrating sometimes depending on the conditions when you are redirecting player and its possible that the case also includes no approach for a player to read chat. In these situations a redirect without prompt and also without any nick change should be available.
Suppose, a player loves LW server, and loves Impersonating. So, if he impersonates someone on 'a' server, then the owner can easily redirect him to other server to get him/her banned.

Dude please, you make no sense and you are not understanding me at all.

I said there won't be a prompt if I use the nickname parameter, what's so hard to understand? Keep the nickname parameter optional, if server owner uses nickname parameter then the player will be told that he is getting redirected to 'some' server with 'this' nick and use the command to confirm. If I just don't use nickname parameter, he will get redirected without prompt.

If someone is impersonating on my server and joins LW accidentally by redirect, its better since he will get banned for impersonating.
Title: Re: Pickup to teleport to another server
Post by: RW on May 08, 2016, 03:32 AM
Use player.Redirect! player.Redirect(ip, port, nickname, serverpass, userpass);
Title: Re: Pickup to teleport to another server
Post by: . on May 08, 2016, 03:34 AM
Quote from: [F.B.I]RW on May 08, 2016, 03:32 AMUse player.Redirect! player.Redirect(ip, port, nickname, serverpass, userpass);

You're so cool man. Thank god you came and showed them how to do it. None of these nabs could've figured otherwise. You saved the day.
Title: Re: Pickup to teleport to another server
Post by: Thijn on May 08, 2016, 11:21 AM
Quote from: [F.B.I]RW on May 08, 2016, 03:32 AMUse player.Redirect! player.Redirect(ip, port, nickname, serverpass, userpass);
If you'd actually read the topic before posting you'd know that's what they're using.
Title: Re: Pickup to teleport to another server
Post by: EK.IceFlake on May 25, 2017, 12:55 PM
Quote from: Stormeus on May 06, 2016, 10:59 AM
Quote from: maxorator on May 06, 2016, 10:29 AMThe initial idea was to make the client ask the user for the password if OnIncomingConnection rejects the user, but this was never implemented.

Well, now that we have MGUI we probably could afford to add a prompt for that. ¯\_(ツ)_/¯
Bumping this as a reminder. (PM me if this should be on a new topic rather than a bump)
Title: Re: Pickup to teleport to another server
Post by: Stormeus on May 25, 2017, 01:08 PM
Quote from: EK.IceFlake on May 25, 2017, 12:55 PM
Quote from: Stormeus on May 06, 2016, 10:59 AM
Quote from: maxorator on May 06, 2016, 10:29 AMThe initial idea was to make the client ask the user for the password if OnIncomingConnection rejects the user, but this was never implemented.

Well, now that we have MGUI we probably could afford to add a prompt for that. ¯\_(ツ)_/¯
Bumping this as a reminder. (PM me if this should be on a new topic rather than a bump)

Thanks for the reminder, I've logged it myself and I'll get to it once some other pending bugfixes and quality-of-life implementations are done.