14.02.2017, 03:33
Код:
public terminarMission(playerid) { new msg[256]; format(msg,sizeof(msg),"~r~Taxi job cancelled ~w~And You carried ~y~%d~w~ pasengers.",contador[playerid]); GameTextForPlayer(playerid,msg,3000,4); playerInMiniMission[playerid]=-1; avisado[playerid]=-1; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(msg,sizeof(msg),"%s (%d) is no longer a taxi drive.",name, playerid); SendClientMessageToAll(GREEN, msg); 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,msg); } } for (new i=0;i<MAX_PLAYERS;i++) { if(OnTaxiAsPassenger[i]==playerid) { new taxista = playerid; OnTaxiAsPassenger[i]=-1; new viaje=CostoDelViaje[i]; format(msg,sizeof(msg),"~w~You pay to ~g~%s ~n~~r~$%d~w~ for the ~r~taxi~w~ ride.",name,viaje); GameTextForPlayer(i,msg,3000,4); format(msg,sizeof(msg),"~w~You get ~r~$%d~w~ ~n~for the ~r~taxi~w~ ride.",viaje); GameTextForPlayer(taxista,msg,3000,4); GivePlayerCashEx(i,-viaje); GivePlayerCashEx(taxista,viaje); cantidadPasajeros--; if(cantidadPasajeros==0) { KillTimer(caidadefichaTimer); } } } contador[playerid]=0; return 1; }
Код:
(7779) : warning 219: local variable "msg" shadows a variable at a preceding level