Help with spectation
#4

Because you set the player position before you toogle of his/her spectating.

Код:
stock StopSpec(playerid)
{
        statec[playerid] = true;
        SetSpawnInfo(playerid, 0, skin, krd[playerid][0], krd[playerid][1], krd[playerid][2], 0.0, 0, 0, 0, 0, 0, 0);
	TogglePlayerSpectating(playerid,false);
	SetPlayerVirtualWorld(playerid, pInfo[playerid][world]);
	SetPlayerInterior(playerid,pInfo[playerid][interior]);
	if(pInfo[playerid][ant] == false) TogglePlayerControllable(playerid,true);
	for(new slot=0; slot < 13; slot++) GivePlayerWeaponEx(playerid,weaps[playerid][slot], amunition[playerid]
        [slot]);
	return 1;
}
I don't know whether you use team, or not, and don't know your name of skin variable, but you can change it. Only I have done I added the SetSpawnInfo function before the TogglePlayerSpectating, and swaped some code. It has to work.
Reply


Messages In This Thread
Help with spectation - by ,TomY' - 26.07.2017, 13:35
Re: Help with spectation - by aoky - 26.07.2017, 13:44
Re: Help with spectation - by ,TomY' - 26.07.2017, 13:54
Re: Help with spectation - by zsoolt997 - 26.07.2017, 14:19
Re: Help with spectation - by IceBilizard - 26.07.2017, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)