Hallo,
ich hab keine Ahnung wie ich /fare in ein Dialog packen soll...
Kann mir jemand helfen?
if(strcmp(cmd,"/fare",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(TransportDuty[playerid] > 0)
{
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Du bist nun außer Dienst und hast $%d verdient.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
Delete3DTextLabel(Supermod[playerid]);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,0);
GivePlayerMoney(playerid, TransportMoney[playerid]);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
if(IsATaxiFahrerCar(newcar))
{
if(GetPlayerState(playerid) == 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "NUTZUNG: /fare [preis]");
return 1;
}
new stringt[128];
new vid = GetPlayerVehicleID(playerid);
new engine,lights,alarm,doors,bonnet,boot,objective;
moneys = strval(tmp);
if(moneys < 1 || moneys > 500) { SendClientMessage(playerid, COLOR_GREY, " Preis muss zwischen 1 und 500 Dollar liegen!"); return 1; }
TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
GetPlayerName(playerid,sendername,sizeof(sendername));
TogglePlayerControllable(playerid, 1);
SetPlayerColor(playerid,NAMECOLOR_TAXI);
format(stringt, sizeof(stringt), "Taxifahrer\n%s\nPreis: $%d",sendername, TransportValue[playerid] );
Supermod[playerid] = Create3DTextLabel(stringt,COLOR_YELLOW,50.0,50.0,110.0,40.0,0);
Attach3DTextLabelToPlayer(Supermod[playerid], playerid, 0.0, 0.0, 0.4);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,1);
format(string, sizeof(string), "Taxifahrer %s ist im Dienst, Preis: $%d.", sendername, TransportValue[playerid]);
OOCNews(TEAM_GROVE_COLOR,string);
/*for(new i=0; i<MAX_VEHICLES; i++)
{
format(stringt, sizeof(stringt), "Taxifahrer\n%s\nPreis: $%d",sendername, TransportValue[i] );
Supermod[i] = Create3DTextLabel(stringt,COLOR_YELLOW,50.0,50.0,110.0,40.0,0);
Attach3DTextLabelToVehicle(Supermod[i], GetPlayerVehicleID(i),0.0,0.0,0.4 );
}*/
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du fährst das Taxi nicht!");
return 1;
}
}