Guten Tag,
Ich bin am verzweifeln. ich möchte das wenn einer ins Taxi steigt dem taxifahrer geld giebt. also der taxifahrer fährt rum und nimmt anrufe engegen, was auch bisher ohne probleme klappt.
nun weiß ich nicht wie ich das machen muss, das wenn ein Kunde einsteigt das sich das Geld "sammelt" (pro 10 sekundne kommen $1,49 dazu) und sobald er das taxi verlässt dem taxifahrer das geld übergiebt. könnte mir da einer helfen? Wenn ihr teile aus meinen script braucht, schicke ich es. Hier wie ich die Autos für die Taxifahrer habe:
new taxiauto[30];
public OnGameModeInit()
{
//autos:
taxiauto[0] = AddStaticVehicle(438,-2184.2031,306.3790,35.1450,359.8963,6,76); // sf taxi 1
taxiauto[1] = AddStaticVehicle(438,-2175.7793,306.3790,35.1453,359.4155,6,76); // sf taxi 2
taxiauto[2] = AddStaticVehicle(438,-2167.2241,306.3790,35.1445,0.2097,6,76); // sf taxi 3
taxiauto[3] = AddStaticVehicle(438,-2159.2292,306.3790,35.1447,359.1295,6,76); // sf taxi 4
taxiauto[4] = AddStaticVehicle(438,-2159.3430,293.5873,35.1450,180.1490,6,76); // sf taxi 5
taxiauto[5] = AddStaticVehicle(438,-2167.4221,293.5873,35.1456,178.9186,6,76); // sf taxi 6
taxiauto[6] = AddStaticVehicle(438,-2175.7351,293.5873,35.1449,179.5545,6,76); // sf taxi 7
taxiauto[7] = AddStaticVehicle(438,-2184.1580,293.5873,35.1449,179.2379,6,76); // sf taxi 8
taxiauto[8] = AddStaticVehicle(438,-2192.8640,293.5873,35.1448,180.1918,6,76); // sf taxi 9
taxiauto[9] = AddStaticVehicle(438,-2201.4214,293.5873,35.1450,179.0793,6,76); // sf taxi 10
taxiauto[10] = AddStaticVehicle(438,-2210.1338,293.5873,35.1452,180.6180,6,76); // sf taxi 11
taxiauto[11] = AddStaticVehicle(438,-2218.6157,293.5873,35.1451,179.8199,6,76); // sf taxi 12
taxiauto[12] = AddStaticVehicle(438,-2227.2312,293.5873,35.1450,179.8439,6,76); // sf taxi 13
taxiauto[13] = AddStaticVehicle(438,-2235.6106,293.5873,35.1449,178.4133,6,76); // sf taxi 14
taxiauto[14] = AddStaticVehicle(438,-2235.4609,306.3790,35.1452,359.6193,6,76); // sf taxi 15
taxiauto[15] = AddStaticVehicle(438,-2226.8684,306.3790,35.1445,0.3725,6,76); // sf taxi 16
taxiauto[16] = AddStaticVehicle(438,-2218.3547,306.3790,35.1451,359.8901,6,76); // sf taxi 17
taxiauto[17] = AddStaticVehicle(420,1777.1293,-1886.0105,13.1680,90.0721,6,1); // ls taxi 1
taxiauto[18] = AddStaticVehicle(420,1777.1293,-1890.0105,13.1660,90.1538,6,1); // ls taxi 2
taxiauto[19] = AddStaticVehicle(420,1777.1293,-1894.0105,13.1731,89.4291,6,1); // ls taxi 3
taxiauto[20] = AddStaticVehicle(420,1777.1293,-1898.0105,13.1649,89.1020,6,1); // ls taxi 4
taxiauto[21] = AddStaticVehicle(420,1777.1293,-1902.0105,13.1976,89.7102,6,1); // ls taxi 5
taxiauto[22] = AddStaticVehicle(420,1777.1293,-1906.0105,13.1642,89.5825,6,1); // ls taxi 6
taxiauto[23] = AddStaticVehicle(420,1777.1293,-1910.0105,13.1655,91.0562,6,1); // ls taxi 7
taxiauto[24] = AddStaticVehicle(420,1777.1293,-1914.0105,13.1650,89.2689,6,1); // ls taxi 8
taxiauto[25] = AddStaticVehicle(420,1777.1293,-1918.0105,13.1620,89.9900,6,1); // ls taxi 9
taxiauto[26] = AddStaticVehicle(420,1777.1293,-1922.0105,13.1652,89.8097,6,1); // ls taxi 10
taxiauto[27] = AddStaticVehicle(420,1777.1293,-1926.0105,13.1754,90.8608,6,1); // ls taxi 11
taxiauto[28] = AddStaticVehicle(420,1777.1293,-1930.0105,13.1731,90.5852,6,1); // ls taxi 12
taxiauto[29] = AddStaticVehicle(420,1777.1293,-1934.0105,13.1731,90.5852,6,1); // ls taxi 13
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(ispassenger == 0) //wenn er als fahrer einsteigt
{
for(new j = 0;j<sizeof taxiauto;j++)
{
if(vehicleid == taxiauto[j]) //wenn er in ein taxi steigt
{
if(gTeam[playerid] == Team_Taxi) //wenn er taxi fahrer ist passiert nichts
{
}
else //ansonsten
{
TogglePlayerControllable(playerid,1); //vorgang wird gestoppt
}
}
}
}
return 1;
}