public updatetime(){ new string[256]; if(worldtimes == 5 && worldtimet == 9) { worldtimef++; worldtimes = 0; worldtimet = 0; } else if(worldtimet == 9){ worldtimes++; worldtimet = 0; } else if(worldtimef == 24 && worltimes == 5 && worldtimet == 9) { worldtimef = 0; worldtimes = 0; worldtimet = 0; worlday++; } else { worldtimet++; } for(new i = 0; i <= MAX_PLAYERS; i++){ if(IsPlayerConnected(i)) { format(string, sizeof(string), "%i:%i%i", worldtimef,worldtimes,worldtimet); TextDrawDestroy(showtime[i]); showtime[i] = TextDrawCreate(540, 25, string); TextDrawSetShadow(showtime[i], 0); TextDrawColor(showtime[i], COLOR_WHITE); TextDrawSetOutline(showtime[i], 1); TextDrawLetterSize(showtime[i], 1, 1); TextDrawShowForPlayer(i, showtime[i]); } } } public speed(){ for(new i = 0; i <= MAX_PLAYERS; i++){ if(IsPlayerConnected(i)){ if(IsPlayerInAnyVehicle(i)){ new dis, string[256]; if(gSpeedo[i] == 1) { dis = PlayerToCoord(i, gLastX[i], gLastY[i], gLastZ[i]); dis = dis * 60; dis = dis * 60; dis = floatround(dis / 1000); format(string, sizeof(string), "%i km/h", dis); TextDrawDestroy(showspeed[i]); showspeed[i] = TextDrawCreate(550, 50, string); TextDrawSetShadow(showspeed[i], 0); TextDrawColor(showspeed[i], COLOR_GREEN); TextDrawSetOutline(showspeed[i], 1); TextDrawShowForPlayer(i, showspeed[i]); GetPlayerPos(i, gLastX[i], gLastY[i], gLastZ[i]); } if(gSpeedo[i] == 2) { dis = PlayerToCoord(i, gLastX[i], gLastY[i], gLastZ[i]); dis = dis / 1; dis = dis * 2; format(string, sizeof(string), "%i mp/h", dis); TextDrawDestroy(showspeed[i]); showspeed[i] = TextDrawCreate(550, 50, string); TextDrawSetShadow(showspeed[i], 0); TextDrawColor(showspeed[i], COLOR_GREEN); TextDrawSetOutline(showspeed[i], 1); TextDrawShowForPlayer(i, showspeed[i]); GetPlayerPos(i, gLastX[i], gLastY[i], gLastZ[i]); } } } } }