Command /ride - problem with virtual world
#1

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
Reply
#2

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!
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)