spectate server crash [+Rep] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: spectate server crash [+Rep] (
/showthread.php?tid=589474)
spectate server crash [+Rep] -
simo0000 - 19.09.2015
hello guys i have a problem when a player dies he will spectate a random alive player works but when the other map loads and function spectateoff called the server crash plz help
pawn Код:
forward SpectateOn(playerid);
public SpectateOn(playerid)
{
print("SpectateOn");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Player[i][IsPlaying] && playerid != i)
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, i);
SetPlayerInterior(playerid, GetPlayerInterior(i));
PlayerSpectateVehicle(playerid, Player[i][VehicleID]);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(i));
Player[playerid][SpectateID] = i;
}
}
new str[128];
if(Player[playerid][SpectateID] != -1)
{
format(str, 128, "You are now spectating %s (ID:%d).", PlayerName(Player[playerid][SpectateID]), Player[playerid][SpectateID]);
SendClientMessage(playerid, COLOR_WHITE, str);
}
return 1;
}
forward SpectateOff(playerid);
public SpectateOff(playerid)
{
print("SpectateOff");
TogglePlayerSpectating(playerid, 0);
Player[playerid][SpectateID] = -1;
SendClientMessage(playerid, COLOR_WHITE, "You stopped spectating.");
return 1;
}
thnx and sorry for my bad english
Re: spectate server crash [+Rep] -
simo0000 - 19.09.2015
upp!
Re: spectate server crash [+Rep] -
simo0000 - 19.09.2015
bump!
Re: spectate server crash [+Rep] -
simo0000 - 20.09.2015
Upp! help
Re: spectate server crash [+Rep] -
jlalt - 20.09.2015
try to call the speacte off fuction after map complete loading
Re: spectate server crash [+Rep] -
simo0000 - 20.09.2015
Quote:
Originally Posted by jlalt
try to call the speacte off fuction after map complete loading
|
already same server crashed
Re: spectate server crash [+Rep] -
jlalt - 20.09.2015
Quote:
Originally Posted by simo0000
already same server crashed
|
are you sure the problem here?
PHP код:
forward SpectateOff(playerid);
public SpectateOff(playerid)
{
print("SpectateOff");
TogglePlayerSpectating(playerid, 0);
Player[playerid][SpectateID] = -1;
SendClientMessage(playerid, COLOR_WHITE, "You stopped spectating.");
return 1;
}
when you remove it server not crasheing?
Re: spectate server crash [+Rep] -
simo0000 - 20.09.2015
when i remove it the other map won't load