SA-MP Forums Archive
Command /ride - problem with virtual world - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Command /ride - problem with virtual world (/showthread.php?tid=96783)



Command /ride - problem with virtual world - malver - 10.09.2009

Hello!

First, I apologize for my English.

I have a command /ride that, when typed, teleports the player to the passenger seat of the ID chosen. The problem is that the command does not work well when the player is in another world, so much to me as him.

I tried to add this:

SetVehicleVirtualWorld (Vehid, GetPlayerVirtualWorld (playerid));
SetPlayerVirtualWorld (playerid, GetPlayerVirtualWorld (playerid));

But still does not work, if I use the command with a player who is a world different from mine, he becomes invisible and bug, for me the same thing happens.

How do to solve this, please?

Thanks


Re: Command /ride - problem with virtual world - LuxurioN™ - 10.09.2009

Try:
pawn Код:
SetPlayerInterior(playerid,GetPlayerInterior(otherplayer));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(otherplayer));
pawn Код:
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(otherplayer));
Because:

Playerid = is you.

Otherplayer = is player to be teleported.

You can not use 'playerid' for you and the other player.
Or do you teleport yourself to yourself ... your own virtual world? 0o

pawn Код:
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Utilize: /goto (playerid)");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid player ID!.");
Note: I not tested it!


Re: Command /ride - problem with virtual world - malver - 11.09.2009

LOL, ok... I saw better the command now, I think it will be easier.

I'll try that ... Thank you very much.