Pickup to teleport to another server

Started by Coolkid, May 05, 2016, 10:51 AM

Previous topic - Next topic

Coolkid

As the topic says is it possible to teleport a player to another server using a pickup

Thijn


Coolkid

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

Coolkid

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, "", "");
 }
}

DizzasTeR

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.

KAKAN

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

EK.IceFlake

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]

DizzasTeR

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.

EK.IceFlake

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.

Xmair

This might be a bit off topic but what is the "userpass" in the /connect and CPlayer.Redirect?

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Anik

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

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Stormeus

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

maxorator

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.

DizzasTeR

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.