OnPlayerStateChange
#5

Now it does the following:

Код:
 public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	new pName[MAX_PLAYER_NAME];
	GetPlayerName (playerid, pName, sizeof (pName));
	if (strcmp (Carlist[vehicleid][owner], pName, true) == 0)
	{        // It is true
		SendClientMessage(playerid, COLOR_YELLOW, "* Welcome");
	}
	else
	{        // Not true.
        SendClientMessage(playerid, COLOR_RED, "* EJECT");
        RemovePlayerFromVehicle(playerid);
	}
	return 1;
}
it Sends Welcome to me (if I enter any vehicle)
And it doesn't do anything to others

EDIT: The case that it sends me this message with any vehicle is fixed.
I need the part which kicks others out of my vehicle (Little Alarm System)
Reply


Messages In This Thread
OnPlayerStateChange - by [DDC]Delight - 14.12.2010, 21:02
Re: OnPlayerStateChange - by Marcel - 14.12.2010, 21:21
Re: OnPlayerStateChange - by [DDC]Delight - 14.12.2010, 21:23
Re: OnPlayerStateChange - by Marcel - 14.12.2010, 21:26
Re: OnPlayerStateChange - by [DDC]Delight - 14.12.2010, 21:37
Re: OnPlayerStateChange - by [DDC]Delight - 15.12.2010, 11:18
Re: OnPlayerStateChange - by [DDC]Delight - 16.12.2010, 12:21
Re: OnPlayerStateChange - by [DDC]Delight - 20.12.2010, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)