Can't see other players in the game - 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)
+--- Thread: Can't see other players in the game (
/showthread.php?tid=656998)
Can't see other players in the game -
Jing_Chan - 29.07.2018
Hi.
Under OnPlayerSpawn I have this:
pawn Код:
SetSpawnInfo(playerid, 0, 45, 397.3343,-2686.8542,-37.5357, 1.0, -1, -1, -1, -1, -1, -1);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 123469);
I can't see other players in the server yet their colour icons are on the minimap, any idea? I diagnosed by checking our VW & Int which both match yet we can't see each other.
Even with the goto command as listed:
pawn Код:
CMD:goto(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: You are not authorized to use this command.");
new target;
if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_LIGHTRED, "USAGE: /goto [id]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: The specified player is not conected.");
if(target == playerid) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: You can't teleport to yourself.");
new Float:currentpos[3];
GetPlayerPos(target, currentpos[0], currentpos[1], currentpos[2]);
SetPlayerInterior(playerid, GetPlayerInterior(target));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(target));
if(GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid), currentpos[0] + 2.5, currentpos[1], currentpos[2]);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), GetPlayerInterior(target));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), GetPlayerVirtualWorld(target));
}
else SetPlayerPos(playerid, currentpos[0] + 2.0, currentpos[1], currentpos[2]);
PlayerPlaySound(target, 1057, 0.0, 0.0, 0.0);
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
new string[144];
format(string, sizeof(string), "SERVER: You have teleported to %s(%i)'s position.", Name(target), target);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "SERVER: %s(%i) has been teleported to your location.", Name(playerid), playerid);
SendClientMessage(target, COLOR_LIGHTRED, string);
return 1;
}
I can't see them when it teleports me to them.
Re: Can't see other players in the game -
Florin48 - 29.07.2018
try to make SetPlayerVirtualWorld(playerid, 123469); to SetPlayerVirtualWorld(playerid, 0);