13.10.2014, 14:28
has been good.....
other mode is good, but what went wrong? I did not touch him.
full code:
other mode is good, but what went wrong? I did not touch him.
Код:
public KocsiText() { new S[256], Float: elet, vehicleid, uzemanyag[50]; for(new player; player < MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { vehicleid = GetPlayerVehicleID(player); GetVehicleHealth(vehicleid, elet); GetVehicleHealth(vehicleid, elet); if(elet < 300) return KocsiOff(vehicleid); switch(vInfo[vehicleid][UZEMANYAGTIPUS]) { case BENZIN: { uzemanyag = "Benzin"; } case DIESEL: { uzemanyag = "Diesel"; } } if(vInfo[vehicleid][UZEMANYAGTIPUS] > 0) { format(S, sizeof(S), "%s: ~y~%d~w~~n~%s: ~y~%d l~w~", FixGameString("KM/H"), GetVehicleSpeed(vehicleid), uzemanyag, vInfo[vehicleid][UZEMANYAG]); <<WARNING if(vInfo[vehicleid][UZEMANYAGTIPUS] != vInfo[vehicleid][UZEMANYAGTIPUSVAN]) format(S, sizeof(S), "%s: ~y~%d~w~~n~N/A: ~y~%d l~w~", FixGameString("KM/H"), GetVehicleSpeed(vehicleid), vInfo[vehicleid][UZEMANYAG]); <<WARNING } else { format(S, sizeof(S), "%s ~y~%d~w~", FixGameString("KM/H:"), GetVehicleSpeed(vehicleid)); <<WARNING } PlayerTextDrawSetString(player, Uzemanyagtext[player], S); } } return 1; }
Код:
new PlayerText:Uzemanyagtext[MAX_PLAYERS];
Код:
Uzemanyagtext[playerid] = CreatePlayerTextDraw(playerid, 499.000000, 367.000000, "Sebesseg: %dkm/h~n~Allapot: %d/1000~n~Uzemanyag: %d l"); PlayerTextDrawBackgroundColor(playerid, Uzemanyagtext[playerid], 255); PlayerTextDrawFont(playerid, Uzemanyagtext[playerid], 2); PlayerTextDrawLetterSize(playerid, Uzemanyagtext[playerid], 0.270000, 1.199999); PlayerTextDrawColor(playerid, Uzemanyagtext[playerid], -1); PlayerTextDrawSetOutline(playerid, Uzemanyagtext[playerid], 0); PlayerTextDrawSetProportional(playerid, Uzemanyagtext[playerid], 1); PlayerTextDrawSetShadow(playerid, Uzemanyagtext[playerid], 1); PlayerTextDrawUseBox(playerid, Uzemanyagtext[playerid], 1); PlayerTextDrawBoxColor(playerid, Uzemanyagtext[playerid], 102); PlayerTextDrawTextSize(playerid, Uzemanyagtext[playerid], 624.000000, 0.000000);
Код:
: warning 202: number of arguments does not match definition : warning 202: number of arguments does not match definition : warning 202: number of arguments does not match definition