22.12.2014, 22:58
Hello.
So what im trying to do is, make a command that spectates the leader of a gang.
HEres the code:
all in all code works just fine. The problem is, if im inside a building(in a different interrior) it shows sky after using the command. If im outside, nearby the leader (in the same interrior with the leader) the command works just fine. I can't figure it out whats wrong with it o.o
So what im trying to do is, make a command that spectates the leader of a gang.
HEres the code:
PHP код:
CMD:spectate3(playerid, params[])
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(PlayerInfo[i][pLeader] == F_BALLAS)
{
TogglePlayerSpectating(playerid, 1);
SetPlayerInterior(playerid, GetPlayerInterior(i));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(i));
PlayerSpectatePlayer(playerid, i);
}
}
}