SA-MP Forums Archive
anti- car park? - 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: anti- car park? (/showthread.php?tid=451863)



anti- car park? - Hitman-97- - 18.07.2013

hello there, I was wondering how can I create an anti car park system?
all it does is whenever someone gets car parked, it will move the player being car parked above the car with 2 to 3 z-coordinates.
please help me with this and thanks


Re: anti- car park? - Rufio - 18.07.2013

I dont really think it is possible. But it is possible to punish the car parker after the victim dies though.


Re: anti- car park? - RALL0 - 18.07.2013

You can send the admins a message of the killerid possibly car parking another player, use OnPlayerDeath and check if the killerid is the driver of a vehicle, if it is so you can send the admins a message.


Re: anti- car park? - Isolated - 18.07.2013

OnPlayerGiveDamage. If you need help, I'll write you something. Please don't post if you do not know what you are talking about.


Re: anti- car park? - RALL0 - 18.07.2013

Quote:
Originally Posted by Isolated
Посмотреть сообщение
OnPlayerGiveDamage. If you need help, I'll write you something. Please don't post if you do not know what you are talking about.
Very intelligent, why would he post it here if he would not need any help? You basicly ask if he needs help while he posts a "help me" thread.


Re: anti- car park? - Rufio - 18.07.2013

Quote:
Originally Posted by Isolated
Посмотреть сообщение
OnPlayerGiveDamage. If you need help, I'll write you something. Please don't post if you do not know what you are talking about.
Please do NOT offend people. I didn't say i am pretty sure it is impossible. I just try to help. Try to be more respectful.


Re: anti- car park? - Isolated - 18.07.2013

Quote:
Originally Posted by RALL0
Посмотреть сообщение
Very intelligent, why would he post it here if he would not need any help? You basicly ask if he needs help while he posts a "help me" thread.
Thanks for the input, however I was actually asking if he needs help to create something using the callback I recommended.

Quote:
Originally Posted by Rufio
Посмотреть сообщение
Please do NOT offend people. I didn't say i am pretty sure it is impossible. I just try to help. Try to be more respectful.
Quote:
Originally Posted by Rufio
Посмотреть сообщение
I dont really think it is possible. But it is possible to punish the car parker after the victim dies though.
You're basically telling him that the only way he can check is after the victim has died, there are many other ways to check before the victim has died. So therefore your comment was redundant and not needed. I was in fact not being rude, and just giving you some information before you start giving out wrong advice.


Re: anti- car park? - Elie1996 - 19.07.2013

Use OnPlayerGiveDamage
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage

try this, not sure if it'll work but worth a shot :
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
  if(IsPlayerInAnyVehicle(playerid)) // Send Admins Message
  return 1;
}



Re: anti- car park? - SuperViper - 19.07.2013

http://forum.sa-mp.com/showthread.ph...65#post2601465

Check when a player is car rammed and change his position.


Re: anti- car park? - MP2 - 19.07.2013

If their health is going down rapidly OnPlayerTakeDamage is going to be called very frequently. Not sure what the killerid or weaponid would be, but it's worth a check. If it's called frequently with the reason 'vehicle collision' then they're under it.