14.02.2017, 05:34
PHP код:
public terminarMission(playerid)
{
new msgg[256];
format(msgg,sizeof(msgg),"~r~Taxi job cancelled ~w~And You carried ~y~%d~w~ pasengers.",contador[playerid]);
GameTextForPlayer(playerid,msgg,3000,4);
playerInMiniMission[playerid]=-1;
avisado[playerid]=-1;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(msgg,sizeof(msgg),"%s (%d) is no longer a taxi drive.",name, playerid);
SendClientMessageToAll(GREEN, msgg);
SendClientMessage(playerid,RED,"Taxi Job Cancelled.");
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
for (new i=0;i<MAX_PLAYERS;i++)
{
if(playerid!=i)
{
SendClientMessage(i,0xFFFF00AA," ");
SendClientMessage(i,0xFFFF00AA,msgg);
}
}
for (new i=0;i<MAX_PLAYERS;i++)
{
if(OnTaxiAsPassenger[i]==playerid)
{
new taxista = playerid;
OnTaxiAsPassenger[i]=-1;
new viaje=CostoDelViaje[i];
format(msgg,sizeof(msgg),"~w~You pay to ~g~%s ~n~~r~$%d~w~ for the ~r~taxi~w~ ride.",name,viaje);
GameTextForPlayer(i,msgg,3000,4);
format(msgg,sizeof(msgg),"~w~You get ~r~$%d~w~ ~n~for the ~r~taxi~w~ ride.",viaje);
GameTextForPlayer(taxista,msgg,3000,4);
GivePlayerCashEx(i,-viaje);
GivePlayerCashEx(taxista,viaje);
cantidadPasajeros--;
if(cantidadPasajeros==0)
{
KillTimer(caidadefichaTimer);
}
}
}
contador[playerid]=0;
return 1;
}