28.05.2018, 06:07
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:
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.
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.