Las Venturas Playground
Anti-Afk / anti spawn kill - Printable Version

+- Las Venturas Playground (https://forum.sa-mp.nl)
+-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html)
+--- Forum: Development (https://forum.sa-mp.nl/forum-16.html)
+--- Thread: Anti-Afk / anti spawn kill (/thread-33660.html)

Pages: 1 2


Anti-Afk / anti spawn kill - [PK]Ignatius - 12-05-2016

I want to suggest anti-afk to prevent death evasion.
Anti Spawn Kill
https://wiki.sa-mp.com/wiki/SetTimerEx
Code:
// The event callback (OnPlayerSpawn) - we will start a timer here
public OnPlayerSpawn(playerid)
{
  // Anti-Spawnkill (5 seconds)

  // Set their health very high so they can't be killed
  SetPlayerHealth(playerid, 999999);

  // Notify them
  SendClientMessage(playerid, -1, "You are protected against spawn-killing for 5 seconds.");

  // Start a 5 second timer to end the anti-spawnkill
  SetTimerEx("EndAntiSpawnKill", 5000, false, "i", playerid);
}

// Forward (make public) the function so the server can 'see' it
forward EndAntiSpawnKill(playerid);

// The timer function - the code to be executed when the timer is called goes here
public EndAntiSpawnKill(playerid)
{
  // 5 seconds has passed, so let's set their health back to 100
  SetPlayerHealth(playerid, 100);

  // Let's notify them also
  SendClientMessage(playerid, -1, "You are no longer protected against spawn-killing.");
  return 1;
}



RE: Anti-Afk / anti spawn kill - Batata45 - 12-05-2016

No. Anti spawnkill, maybe, but what about all those idlers on the ship?


RE: Anti-Afk / anti spawn kill - Ricky92 - 12-05-2016

(12-05-2016, 05:17 PM)Harambe Wrote: No. Anti spawnkill, maybe, but what about all those idlers on the ship?

Isn't the purpose of the ship ment for idlers?


RE: Anti-Afk / anti spawn kill - TEF - 12-05-2016

We already have an anti-idling mechanism at play on the server, and an anti-spawnkill has been suggested already. Putting time and effort into preventative measures against death evasion (with specific regard to quitting/minimization) is almost moot, considering the fact that players can always simply quit the game to do so. We do already have certain restrictions for our teleportation systems (including interiors), though. Overall, it is best to simply report these players when you come across them. :)


RE: Anti-Afk / anti spawn kill - Batata45 - 12-06-2016

Ricky, that's what I meant lol, what about them ? They are always afk xd


RE: Anti-Afk / anti spawn kill - [PK]Ignatius - 12-06-2016

(12-05-2016, 07:57 PM)TEF Wrote: We already have an anti-idling mechanism at play on the server, and an anti-spawnkill has been suggested already. Putting time and effort into preventative measures against death evasion (with specific regard to quitting/minimization) is almost moot, considering the fact that players can always simply quit the game to do so. We do already have certain restrictions for our teleportation systems (including interiors), though. Overall, it is best to simply report these players when you come across them. :)

Why Chepe he always afk and there's nothing happen to him he always stay in the ship and afking


RE: Anti-Afk / anti spawn kill - Batata45 - 12-06-2016

That's the purpose of a ship, peaople are granted invincibility so they can idle in there
Also, i don't know what you have against idlers, but they are not doing any harm... So i think this anti afk suggestion is pretty much useless


RE: Anti-Afk / anti spawn kill - [PK]Ignatius - 12-07-2016

I can AFK in the ship safetly?


RE: Anti-Afk / anti spawn kill - Xanland - 12-07-2016

Yes, the ship is for a reason weapon-free and vehicles won't be able to enter that zone.

I do recommend though to keep idling at a minimum!


RE: Anti-Afk / anti spawn kill - Russell - 12-18-2016

Idling is absolutely fine. We have proper systems in place to make sure that it won't affect your stats.

I think that Yassine uploaded a pull request for adding spawn protection, but I haven't been able to get to that yet. I agree that we should add something like that.