SA-MP Forums Archive
How the hell is this possible? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How the hell is this possible? (/showthread.php?tid=84023)



How the hell is this possible? - Gappy - 28.06.2009

In L Admin me and V1ceC1ty did /fu about 4 times, "SERVER: Unknown Command" came up after the 4th time and then all my text went yellow.
We tried it a couple of times and every time our chat went yellow.

Anyone know how to do this? I've looked through the L Admin script and didn't find anything.



Picture is 100% real, not photoshopped


Re: How the hell is this possible? - Grim_ - 28.06.2009

Ask in the lAdmin topic.


Re: How the hell is this possible? - Gappy - 29.06.2009

Bumping this because like no one looks at the Ladmin thread.


Re: How the hell is this possible? - ledzep - 29.06.2009

My guess is that the script crashed.


Re: How the hell is this possible? - krisk - 29.06.2009

Hi, I did some research in that script, and my guess is this, this is whats called if player is in a vehicle when you perform "/fu".

pawn Код:
EraseVehicle(vehicleid)
{
  for(new players=0;players<=MAX_PLAYERS;players++)
  {
    new Float:X,Float:Y,Float:Z;
    if (IsPlayerInVehicle(players,vehicleid))
    {
      GetPlayerPos(players,X,Y,Z);
      SetPlayerPos(players,X,Y,Z+2);
      SetVehicleToRespawn(vehicleid);
    }
    SetVehicleParamsForPlayer(vehicleid,players,0,1);
  }
  SetTimerEx("VehRes",3000,0,"d",vehicleid);
  return 1;
}
The "VehRes()" function thats called in 3 seconds don't have any checks if the vehicle is still around, it just calls DestroyVehicle()

So if you "spam" that command, it'll start several timers to remove the same vehicle in 3 seconds, meaning when the first one has removed the vehicle, and there's 1-2 more incoming to perform the same task, that might cause the crash, I'm unsure if DestroyVehicle() on non-existing vehicle ID is a cause of gamemode crash, but it could, and is likely your problem.

So in theory it'd be enough to type the command twice after eachother within a 3 seconds delay and you'd cause the same problem.


Re: How the hell is this possible? - Nero_3D - 29.06.2009

The text will appear yellow if the playername reach a specific length (I think it was MAX_PLAYER_NAME (24) but its old and I forgot)


Re: How the hell is this possible? - Gappy - 29.06.2009

Nothing crashed really, the text just went yellow. After it went yellow I couldn't use any commands, i just reconnected and all commands worked again. There was no crash though.

EDIT:

Just saw your post ♣ ⓐⓢⓢ, I'll test your theory.


Re: How the hell is this possible? - krisk - 29.06.2009

Quote:
Originally Posted by ♣ ⓐⓢⓢ
The text will appear yellow if the playername reach a specific length (I think it was MAX_PLAYER_NAME (24) but its old and I forgot)
That might as well be the problem, causing OOB when you exceed the length, but that name seems to be exactly 24 characters so it shouldn't really cause any issues, unless you have less than 24 characters limit elsewhere in your OnPlayerText? Because that'd cause OOB on the playername array you're using to display the username.

And in "crashing" I mean game-mode crash, where normal game-mode functionality stop working.