What saving system do u use?
EDIT:
This is the base of the script I made for specing:
Edit it to your liking..
Код:
CMD:spec(playerid, params[])
{
new playerspec;
if(!sscanf(params, "u", playerspec))
foreach(Player, i)
{
if(PlayerInfo[i][AdminLevel] >= 1)
{
if(PlayerInfo[playerid][AdminLevel] >= 1)
{
if(isaduty[playerid] == aduty_1)
{
if(isspec[playerid] == nospec)
{
new string[254];
new playernamespec[MAX_PLAYER_NAME], admin[MAX_PLAYER_NAME];
GetPlayerName(playerid, admin, sizeof(admin));
GetPlayerName(playerspec, playernamespec, sizeof(playerspec));
SaveLastPos(playerid);
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, playerspec);
format(string, sizeof(string), "[ADMIN] %s is now spectating %s", admin, playernamespec);
SendClientMessage(i, 0xFF00009A, string);
isspec[playerid] = yesspec;
return 1;
}
else return SendClientMessage(playerid, 0xFF00009A, "You are already spectating! Use /endspec");
}
else return SendClientMessage(playerid, 0xFF00009A, "You are not on admin duty!");
}
else return SendClientMessage(playerid, 0xFF00009A, "You are not allowed to use this command!");
}
}
return 1;
}
CMD:endspec(playerid, params[])
{
foreach(Player, i)
{
if(PlayerInfo[i][AdminLevel] >= 1)
{
if(PlayerInfo[playerid][AdminLevel] >= 1)
{
if(isspec[playerid] == yesspec)
{
new string[254];
new admin[MAX_PLAYER_NAME];
GetPlayerName(playerid, admin, sizeof(admin));
TogglePlayerSpectating(playerid, 0);
format(string, sizeof(string), "[ADMIN] %s is no longer spectating!", admin);
SendClientMessage(i, 0xFF00009A, string);
isspec[playerid] = nospec;
LoadLastPos(playerid);
return 1;
}
else return SendClientMessage(playerid, 0xFF00009A, "You are not spectating!");
}
else return SendClientMessage(playerid, 0xFF00009A, "You are not allowed to use this command!");
}
}
return 1;
}