anti- car park?
#1

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
Reply
#2

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

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.
Reply
#4

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

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.
Reply
#6

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.
Reply
#7

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.
Reply
#8

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;
}
Reply
#9

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

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)