SA-MP Forums Archive
This Vehicle belong to %s - 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: This Vehicle belong to %s (/showthread.php?tid=420325)



This Vehicle belong to %s - Youtube12 - 04.03.2013

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;



Re: This Vehicle belong to %s - Misiur - 04.03.2013

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


Respuesta: This Vehicle belong to %s - CrossOv3r - 04.03.2013

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


AW: This Vehicle belong to %s - Youtube12 - 04.03.2013

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


Respuesta: AW: This Vehicle belong to %s - CrossOv3r - 04.03.2013

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.


AW: This Vehicle belong to %s - Youtube12 - 04.03.2013

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"


Respuesta: This Vehicle belong to %s - CrossOv3r - 04.03.2013

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