[SOLVED] Car restricted to name - 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: [SOLVED] Car restricted to name (
/showthread.php?tid=122918)
[SOLVED] Car restricted to name -
VonLeeuwen - 23.01.2010
Hey, I'm trying to make a system so only one guy with the name Tinus, or VonLeeuwen can enter it.
This is my script, but simply nothing happens when we enter.
Код:
new sandkingtinus;
new sandkingvon;
Код:
sandkingtinus = AddStaticVehicle(495,-696.6309,946.5757,12.6335,3.4700,114,108); // sandking VonLeeuwen
sandkingvon = AddStaticVehicle(495,-78.6387,947.1689,12.4842,358.8175,114,108); // sandking Tinus
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(vehicle == sandkingtinus)
{
if(!strcmp(name, "tinus", false, 0))
{
SendClientMessage(playerid, cyan, "Sorry, this car is reserved for Tinus.");
}
}
if(vehicle == sandkingvon)
{
if(!strcmp(name,"vonleeuwen",false, 0))
{
SendClientMessage(playerid,cyan,"Sorry, this car is reserved for VonLeeuwen.");
}
}
return 1;
}
Thanks for helping.
Re: [HELP] Car restricted to name -
addysnow1 - 23.01.2010
new AddysCar;
AddysCar = AddStaticVehicle(....................);
if(YouAreGay = AddysCar)
{
SendClientMessage(playerid,COLORHERE,"YOU CANNOT DRIVE THIS CAR MOTHERFOCKER");
RemovePlayerFromVehicle(playerid);
}
Something like this
Re: [HELP] Car restricted to name -
VonLeeuwen - 23.01.2010
Are you stoned?
Re: [HELP] Car restricted to name -
WThieves - 23.01.2010
You don't believe it...
There is an app for this!
http://forum.sa-mp.com/index.php?topic=132531.0
Re: [HELP] Car restricted to name -
VonLeeuwen - 23.01.2010
Oh thanks, youre right
Re: [SOLVED] Car restricted to name -
addysnow1 - 24.01.2010
Sorry
.
Re: [SOLVED] Car restricted to name -
VonLeeuwen - 24.01.2010
Were you stoned or not? xd