Reserved Car? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Reserved Car? (
/showthread.php?tid=173065)
Reserved Car? -
Quest123 - 01.09.2010
I've seen this done on a server before, what is basically is, is just a normal car, but when people try to enter it it wont let them, and it sends them a message saying " This Vehicle Is Reserved For %d" or whatever, so its a custom reserved car, anyone know how i could do this?
Thanks
Re: Reserved Car? -
[HiC]TheKiller - 01.09.2010
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new Pname[24];
GetPlayerName(playerid, Pname, 24);
if(vehicleid == /*The certain vehicle ID you want to restrict*/ && strcmp(Pname, /*Name you want to restrict the car to*/, true) && ispassenger == 0)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
}
return 1;
}
Re: Reserved Car? -
Quest123 - 01.09.2010
Quote:
Originally Posted by [HiC]TheKiller
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new Pname[24]; GetPlayerName(playerid, Pname, 24); if(vehicleid == /*The certain vehicle ID you want to restrict*/ && strcmp(Pname, /*Name you want to restrict the car to*/, true) && ispassenger == 0) { new Float:Pos[3]; GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); } return 1; }
|
thanks! so where should i put this in my script? also do i need to define anything or whatsoever?
Re: Reserved Car? -
R@ger - 01.09.2010
https://sampforum.blast.hk/showthread.php?tid=145661
that should help i guess