[SOLVED] Car restricted to name
#1

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.
Reply
#2

new AddysCar;
AddysCar = AddStaticVehicle(....................);
if(YouAreGay = AddysCar)
{
SendClientMessage(playerid,COLORHERE,"YOU CANNOT DRIVE THIS CAR MOTHERFOCKER");
RemovePlayerFromVehicle(playerid);
}

Something like this
Reply
#3

Are you stoned?
Reply
#4

You don't believe it...
There is an app for this!

http://forum.sa-mp.com/index.php?topic=132531.0
Reply
#5

Oh thanks, youre right
Reply
#6

Sorry .
Reply
#7

Were you stoned or not? xd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)