This Vehicle belong to %s
#1

Hi guys who can help me to do a script that "No one can enter your OWN Vehicle"

And if someone try to enter your OWN Vehicle, its will send a message"This Vehicle belong to [PlayerName]

If u buy a car (my code):

Код:
AccountInfo[playerid][VehicleID] = 541;
Reply
#2

I'd suggest
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx

You can lock doors for everyone, and unlock only for specific player
Reply
#3

Try this:

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(AccountInfo[playerid][VehicleID] == vehicleid)
 {
   SendClientMessage(playerid, -1, "Welcome to your vehicle!");
 }
 else
 {
   RemovePlayerFromVehicle(playerid);
   SendClientMessage(playerid, -1, "This isnt your vehicle");
 }
  return 1;
}
If you want to get the Name of the vehicle owner.. then post your Owner vehicle variable...
Reply
#4

Quote:
Originally Posted by Misiur
Посмотреть сообщение
I'd suggest
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx

You can lock doors for everyone, and unlock only for specific player


I dont want with command, I need it automatic when someone try to enter your Own car, he will get removed from the car and its will send him a message, "This car belong to [PlayerName]..
Reply
#5

Quote:
Originally Posted by *******12
Посмотреть сообщение
I dont want with command, I need it automatic when someone try to enter your Own car, he will get removed from the car and its will send him a message, "This car belong to [PlayerName]..
Try whit my example.. also provide us our "Owner" vehicle variable.. if your GM has one, off course.
Reply
#6

Not work..
When i enter a vehicle from my friend, i dont get kick from his vehicle.
and when i enter a normal vehicle, its sending the message "this is not your vehicle"
Reply
#7

Hmmmm... maybe the "VehicleID" isnt the same ID of the SA:MP Counter...

Check if you have any other way to get a vehicleid.. maybe a stock, custom function..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)