Slap when car is for another factions
#2

So you want a player to get slapped if he/she tries to enter a car from another faction?

Just check for the vehicle in OnPlayerEnterVehicle https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle and add this:

Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);//Gets players position
SetPlayerPos(playerid, X, Y, Z+5);//Adds 5 to players Z coord, also slaps the player. Change 5 to what you think is good.
EDIT: I don't know what you mean by 'slapped for 4 seconds', you can freeze the player for 4 seconds if you want to but I don't think it's necessary.
Reply


Messages In This Thread
Slap when car is for another factions - by marshmallow - 28.05.2018, 06:03
Re: Slap when car is for another factions - by andrejc999 - 28.05.2018, 06:07
Re: Slap when car is for another factions - by marshmallow - 28.05.2018, 06:14
Re: Slap when car is for another factions - by andrejc999 - 28.05.2018, 06:42
Re: Slap when car is for another factions - by marshmallow - 28.05.2018, 06:55
Re: Slap when car is for another factions - by andrejc999 - 28.05.2018, 07:11

Forum Jump:


Users browsing this thread: 1 Guest(s)