Problem with car assignment
#1

Hello I need help with car assignment.

For example:
In my server is 2 houses with cars: thirst house and car id 0 second house and car id 1 How to do that: I buy house with ID: 0 then i can drive this car with tis id if i don't have this house i can't drive this car(me kick from this car). Please help me.

My code:
Код:
....
	//AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld)
	AddHouse(0, -2128.1489,755.5568,69.5625, 328.1465, 1478.4457,1084.4375, 10000, 10000, 15, 0);
	//AddHouseCar(houseid, modelid, Float:Carx, Float:Cary, Float:Carz, color1, color2, respawn_delay)
	AddHouseCar(0, 604, -2129.9043,750.3964,69.9336, -1, -1, 5*60*1000);//5 min respawn delay
...
public OnPlayerEnterVehicle(playerid)
{
new str1[255], pname[24], housenumber;
if(dini_Int(str1,"Houseid")) {
housenumber = GetHouseID(playerid);
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "Houses/houseid%d", housenumber);
if(strcmp(hInfo[housenumber][Name],pname)) {
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z);
SendClientMessage(playerid,0xFFFF80FF,"Go away!");
}
else { SendClientMessage(playerid,0xFFFF80FF,"You find your car!"); } }
/*else { }*/
return 1;
}
...
If need something else from my code say. TY.
Reply


Messages In This Thread
Problem with car assignment - by known - 03.11.2010, 06:59
Re: Problem with car assignment - by known - 03.11.2010, 07:55

Forum Jump:


Users browsing this thread: 1 Guest(s)