09.04.2010, 16:35
My bad, it suppose to be like this:
EDIT: You'll need to remove Spec[playerid][Spectating] = false; from /spec off in order this to work.
OnPlayerSpawn should probably be like this:
Код:
LastData[playerid][sinterior] = GetPlayerInterior(playerid); LastData[playerid][smoney] = GetPlayerMoney(playerid);
OnPlayerSpawn should probably be like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(Spec[playerid][Spectating])
{
for(new i; i < 13; i++) GivePlayerWeapon(playerid, WeapData[playerid][0][i], WeapData[playerid][1][i]);
SetPlayerPos(playerid, LastData[playerid][posx], LastData[playerid][posy], LastData[playerid][posz]);
SetPlayerInterior(playerid, LastData[playerid][sinterior]);
SetPlayerMoney(playerid, LastData[playerid][smoney]); //the money received during spectate wont be given here.
Spec[playerid][Spectating] = false;
}
if(Variables[playerid][Jailed]) { SetPlayerInterior(playerid,3); SetPlayerPos(playerid,197.6661,173.8179,1003.0234); SetPlayerFacingAngle(playerid,0); }
return 1;
}