26.07.2017, 14:19
Because you set the player position before you toogle of his/her spectating.
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.
Код:
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; }