11.01.2013, 14:56
How Would I count Private vehicles I have one Ideal but it only counts up to Five Vehicles and makes them private but any more over Private Vehicles u Can Enter and Drive off
If I change it to For(new PV=0; PV != 15 PV++)
Still only counts 5 Or 6 Any more over there not private..
Under OnGameModeInit
under OnPlayerStateChange
If I change it to For(new PV=0; PV != 15 PV++)
Still only counts 5 Or 6 Any more over there not private..
pawn Код:
new TaxiVehicleLS[14];
pawn Код:
public OnGameModeInit()
{
TaxiVehicleLS[1] = AddStaticVehicleEx(437,1779.7747,-1909.4396,13.5150,270.6893,-1, -1, -1); // taxibus 1
TaxiVehicleLS[2] = AddStaticVehicleEx(437,1779.9159,-1905.5310,13.5226,270.6135,-1, -1, -1); // taxibus 2
TaxiVehicleLS[3] = AddStaticVehicleEx(431,1780.0096,-1913.6144,13.4936,271.8171,-1, -1, -1); // taxibus 3
TaxiVehicleLS[4] = AddStaticVehicleEx(431,1780.6726,-1918.0997,13.4908,271.9992,-1, -1, -1); // taxibus 4
TaxiVehicleLS[5] = AddStaticVehicleEx(420,1805.4719,-1900.7300,13.1805,0.3763,-1, -1, -1); // taxicar 1
TaxiVehicleLS[6] = AddStaticVehicleEx(420,1805.4923,-1907.5823,13.1766,0.0030,-1, -1, -1); // taxicar 2
TaxiVehicleLS[7] = AddStaticVehicleEx(420,1805.5555,-1914.0067,13.1747,0.5064,-1, -1, -1); // taxicar 3
TaxiVehicleLS[8] = AddStaticVehicleEx(420,1805.6178,-1920.7666,13.1712,359.7094,-1, -1, -1); // taxicar 4
TaxiVehicleLS[9] = AddStaticVehicleEx(420,1805.5529,-1927.7074,13.1670,359.8926,-1, -1, -1); // taxicar 5
TaxiVehicleLS[10] = AddStaticVehicleEx(420,1802.5177,-1933.4368,13.1809,301.5674,-1, -1, -1); // taxicar 6
TaxiVehicleLS[11] = AddStaticVehicleEx(420,1795.1158,-1934.3496,13.2183,271.0070,-1, -1, -1); // taxicar 7
TaxiVehicleLS[12] = AddStaticVehicleEx(438,1783.0457,-1934.3837,13.4554,270.3791,-1, -1, -1); // taxicar 8
TaxiVehicleLS[13] = AddStaticVehicleEx(438,1776.6875,-1934.2457,13.4331,270.3553,-1, -1, -1); // taxicar 9
new count,vplate[10];
for(new PV=0; PV < MAX_VEHICLES; PV++)
{
if(TaxiVehicleLS[PV] == INVALID_VEHICLE_ID)
{
format(vplate,sizeof(vplate),"LSTV");
SetVehicleNumberPlate(TaxiVehicleLS[PV], vplate);
SetVehicleToRespawn(TaxiVehicleLS[PV]);
count ++;
}
return count;
}
return 1;
}
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
new count;
new Vehicle = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
for(new PV=0; PV < MAX_VEHICLES; PV++)
{
else if( Vehicle == TaxiVehicleLS[PV])
{
if(UserInfo[playerid][uTaxiTeam] != 1)
{
SendClientMessage(playerid, 0x33AA33AA, "You Are Not A Taxi Driver");
RemovePlayerFromVehicle(playerid);
}
else
{
format(string2, sizeof(string2), "You Entered A %s, Owned By LSTX", VehicleNames[GetVehicleModel(Vehicle) -400]);
SendClientMessage(playerid, GREEN, string2);
SendClientMessage(playerid, ORANGE,"You Enter A Taxi Default price $50 To Change type /fare <price>");
}
}
count ++;
}
return count;
}
return 1;
}