29.07.2018, 16:19
Hi.
Under OnPlayerSpawn I have this:
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:
I can't see them when it teleports me to them.
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);
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;
}