Multiple Private Cars
#3

Try this.. I have made lines bold and colorfull for you

Код:
#include <a_samp>

new red;
new car1; // another car name

public OnFilterScriptInit()
{
	red = CreateVehicle(432,776.79998779,-1261.59997559,13.69999981,90.00000000,-1,-1); //Rhino
        car1 = // Add another car line here
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	
	if(newstate == PLAYER_STATE_DRIVER)
	{
	    if(vehicleid == red || car1)
	    {
	        if(strcmp(GetName(playerid), "[DKR]r3d.X", true) == 0)
	        {
	             return 1;
		}
		else
		 {
		     GameTextForPlayer(playerid,"r3d.X's Car!",3000,5);
		     RemovePlayerFromVehicle(playerid);
		  }
	     }
	}
	return 1;
}

stock GetName(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof name);
	return name;
}
Reply


Messages In This Thread
Multiple Private Cars - by lozylo - 25.08.2012, 22:28
Re: Multiple Private Cars - by Johnson_Brooks - 26.08.2012, 00:34
Re: Multiple Private Cars - by Mr.Anonymous - 26.08.2012, 01:54
Re: Multiple Private Cars - by lozylo - 26.08.2012, 11:02
Re: Multiple Private Cars - by Wesley221 - 26.08.2012, 11:16
Re: Multiple Private Cars - by lozylo - 26.08.2012, 11:31
Re: Multiple Private Cars - by Mr.Anonymous - 26.08.2012, 18:42
Re: Multiple Private Cars - by lozylo - 27.08.2012, 11:34
Re: Multiple Private Cars - by Mr.Anonymous - 27.08.2012, 17:00

Forum Jump:


Users browsing this thread: 1 Guest(s)