public AllapotSebessegTimer(playerid){if(IsLogged[playerid] == 1){ if(IsPlayerInAnyVehicle(playerid)) { TextDrawShowForPlayer(playerid,Sebesseg[playerid]); TextDrawShowForPlayer(playerid,Allapot[playerid]); new str[64]; new str1[64]; new speed = GetPlayerSpeed(playerid,true); new Float:vehhealth; new vehid = GetPlayerVehicleID(playerid); GetVehicleHealth(vehid, vehhealth); format(str,64,\"~g~Sebesség: %i km/h\",speed); format(str1,64,\"~g~Állapot: %.0f\",vehhealth); TextDrawSetString(Sebesseg[playerid],str); TextDrawSetString(Allapot[playerid],str1); return 1;}else{ TextDrawHideForPlayer(playerid,Sebesseg[playerid]); TextDrawHideForPlayer(playerid,Allapot[playerid]);}}return 1;}
allapotsebessegtimer = SetTimer(\"AllapotSebessegTimer\", 1000, 1);
TextDrawShowForPlayer(playerid,Sebesseg[playerid]); TextDrawShowForPlayer(playerid,Allapot[playerid]);
format(str,64,\"~g~Sebesség: %i km/h\",speed); format(str1,64,\"~g~Állapot: %.0f\",vehhealth); TextDrawSetString(Sebesseg[playerid],str); TextDrawSetString(Allapot[playerid],str1);
Köszi, mert mi kene rajta valtoztatni?
for(new i;i<PLAYERS;i++){ Sebesseg = TextDrawCreate(463.000000,390.000000,\"~g~Sebesség: 0~h~~h~ km/h\");TextDrawAlignment(Sebesseg,0);TextDrawBackgroundColor(Sebesseg,0x000000ff);TextDrawFont(Sebesseg,1);TextDrawLetterSize(Sebesseg,0.499999,1.600000);TextDrawColor(Sebesseg,0xffffffff);TextDrawSetOutline(Sebesseg,1);TextDrawSetProportional(Sebesseg,1);TextDrawSetShadow(Sebesseg,1);Allapot = TextDrawCreate(462.000000,373.000000,\"Állapot: 1000\");TextDrawAlignment(Allapot,0);TextDrawBackgroundColor(Allapot,0x000000ff);TextDrawFont(Allapot,1);TextDrawLetterSize(Allapot,0.500000,1.500000);TextDrawColor(Allapot,0xffffffff);TextDrawSetOutline(Allapot,1);TextDrawSetProportional(Allapot,1);TextDrawSetShadow(Allapot,1);}
public AllapotSebessegTimer(){for(new i;i<PLAYERS;i++){if(IsLogged == 1){ if(IsPlayerInAnyVehicle(i)) { TextDrawShowForPlayer(i,Sebesseg); TextDrawShowForPlayer(i,Allapot); new str[64]; new str1[64]; new speed = GetPlayerSpeed(i,true); new Float:vehhealth; new vehid = GetPlayerVehicleID(i); GetVehicleHealth(vehid, vehhealth); format(str,64,\"~g~Sebesség: %i km/h\",speed); format(str1,64,\"~g~Állapot: %.0f\",vehhealth); TextDrawSetString(Sebesseg,str); TextDrawSetString(Allapot,str1); return 1; } else { TextDrawHideForPlayer(i,Sebesseg); TextDrawHideForPlayer(i,Allapot); }}}return 1;}